mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 19:39:28 +00:00
zebra: fix vrf deletion
VRF deletion code must be called after the corresponding interface deletion code. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
9e84443aca
commit
e4c5b3ba06
@ -1761,16 +1761,16 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
|
|||||||
desc = (char *)RTA_DATA(tb[IFLA_IFALIAS]);
|
desc = (char *)RTA_DATA(tb[IFLA_IFALIAS]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If VRF, create or update the VRF structure itself. */
|
|
||||||
if (zif_type == ZEBRA_IF_VRF && !vrf_is_backend_netns()) {
|
|
||||||
netlink_vrf_change(h, tb[IFLA_LINKINFO], ns_id, name);
|
|
||||||
vrf_id = (vrf_id_t)ifi->ifi_index;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* See if interface is present. */
|
/* See if interface is present. */
|
||||||
ifp = if_lookup_by_name_per_ns(zns, name);
|
ifp = if_lookup_by_name_per_ns(zns, name);
|
||||||
|
|
||||||
if (h->nlmsg_type == RTM_NEWLINK) {
|
if (h->nlmsg_type == RTM_NEWLINK) {
|
||||||
|
/* If VRF, create or update the VRF structure itself. */
|
||||||
|
if (zif_type == ZEBRA_IF_VRF && !vrf_is_backend_netns()) {
|
||||||
|
netlink_vrf_change(h, tb[IFLA_LINKINFO], ns_id, name);
|
||||||
|
vrf_id = (vrf_id_t)ifi->ifi_index;
|
||||||
|
}
|
||||||
|
|
||||||
if (tb[IFLA_MASTER]) {
|
if (tb[IFLA_MASTER]) {
|
||||||
if (slave_kind && (strcmp(slave_kind, "vrf") == 0)
|
if (slave_kind && (strcmp(slave_kind, "vrf") == 0)
|
||||||
&& !vrf_is_backend_netns()) {
|
&& !vrf_is_backend_netns()) {
|
||||||
@ -2032,6 +2032,10 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
|
|||||||
zebra_l2_vxlanif_del(ifp);
|
zebra_l2_vxlanif_del(ifp);
|
||||||
|
|
||||||
if_delete_update(ifp);
|
if_delete_update(ifp);
|
||||||
|
|
||||||
|
/* If VRF, delete the VRF structure itself. */
|
||||||
|
if (zif_type == ZEBRA_IF_VRF && !vrf_is_backend_netns())
|
||||||
|
netlink_vrf_change(h, tb[IFLA_LINKINFO], ns_id, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user