mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-30 18:46:13 +00:00
zebra: Saving interface description makes no sense on deletion
We were storing the interface description irrelevant of whether or not it was a newlink or dellink. This makes no sense. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
16296beaa5
commit
26f135777c
@ -1376,6 +1376,13 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
|
|||||||
else if (IS_ZEBRA_IF_BOND_SLAVE(ifp) || was_bond_slave)
|
else if (IS_ZEBRA_IF_BOND_SLAVE(ifp) || was_bond_slave)
|
||||||
zebra_l2if_update_bond_slave(ifp, bond_ifindex);
|
zebra_l2if_update_bond_slave(ifp, bond_ifindex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
zif = ifp->info;
|
||||||
|
if (zif) {
|
||||||
|
XFREE(MTYPE_TMP, zif->desc);
|
||||||
|
if (desc)
|
||||||
|
zif->desc = XSTRDUP(MTYPE_TMP, desc);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Delete interface notification from kernel */
|
/* Delete interface notification from kernel */
|
||||||
if (ifp == NULL) {
|
if (ifp == NULL) {
|
||||||
@ -1402,13 +1409,6 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
|
|||||||
if_delete_update(ifp);
|
if_delete_update(ifp);
|
||||||
}
|
}
|
||||||
|
|
||||||
zif = ifp->info;
|
|
||||||
if (zif) {
|
|
||||||
XFREE(MTYPE_TMP, zif->desc);
|
|
||||||
if (desc)
|
|
||||||
zif->desc = XSTRDUP(MTYPE_TMP, desc);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user