Skip to content

Commit

Permalink
Merge pull request #13403 from anlancs/fix/zebra-missing-vrf-flag
Browse files Browse the repository at this point in the history
zebra: Fix missing VRF flag
  • Loading branch information
riw777 authored May 2, 2023
2 parents b9f0c8c + 4141450 commit 1998805
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions zebra/if_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -2323,8 +2323,6 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
zlog_debug("RTM_DELLINK for %s(%u)", name,
ifp->ifindex);

UNSET_FLAG(ifp->status, ZEBRA_INTERFACE_VRF_LOOPBACK);

if (IS_ZEBRA_IF_BOND(ifp))
zebra_l2if_update_bond(ifp, false);
if (IS_ZEBRA_IF_BOND_SLAVE(ifp))
Expand Down
5 changes: 5 additions & 0 deletions zebra/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,8 @@ void if_delete_update(struct interface **pifp)
if (ifp->vrf->vrf_id && !vrf_is_backend_netns())
if_handle_vrf_change(ifp, VRF_DEFAULT);

UNSET_FLAG(ifp->status, ZEBRA_INTERFACE_VRF_LOOPBACK);

/* Reset some zebra interface params to default values. */
zif = ifp->info;
if (zif) {
Expand Down Expand Up @@ -840,6 +842,9 @@ void if_handle_vrf_change(struct interface *ifp, vrf_id_t vrf_id)
/* This is to issue an UPDATE or a DELETE, as appropriate. */
zebra_interface_vrf_update_del(ifp, vrf_id);

if (if_is_vrf(ifp))
return;

/* update VRF */
if_update_to_new_vrf(ifp, vrf_id);

Expand Down

0 comments on commit 1998805

Please sign in to comment.