mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 03:42:57 +00:00
zebra: Fixup crash with vlan interfaces attempted to be used
When zebra starts up it receives from the kernel a full dump of interface information. Unfortunately it is in no particular order. As such we sometimes receive data from the kernel about interfaces we do not know about yet. In this bug, we are attempting to use the interface pointer(->link) for a vlan interface that we have not properly resolved. This fix ensures that we will not attempt to call zvni_map_svi if we have a NULL pointer. There are other places in the code we are already checking for the fact that the ->link pointer is valid before calling this function, so I believe that this is correct. We do need to come back and resolve all ->link pointers after we have received the full table. This can be done in another commit. Ticket: CM-17041 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
dcfe47166a
commit
8cb73ba40d
@ -1224,8 +1224,13 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp)
|
||||
br_slave->bridge_ifindex);
|
||||
}
|
||||
|
||||
if (zebra_if->link_ifindex != IFINDEX_INTERNAL)
|
||||
vty_out(vty, " Link ifindex %u\n", zebra_if->link_ifindex);
|
||||
if (zebra_if->link_ifindex != IFINDEX_INTERNAL) {
|
||||
vty_out(vty, " Link ifindex %u", zebra_if->link_ifindex);
|
||||
if (zebra_if->link)
|
||||
vty_out(vty, "(%s)\n", zebra_if->link->name);
|
||||
else
|
||||
vty_out(vty, "(Unknown)\n");
|
||||
}
|
||||
|
||||
if (HAS_LINK_PARAMS(ifp)) {
|
||||
int i;
|
||||
|
Loading…
Reference in New Issue
Block a user