summaryrefslogtreecommitdiff
path: root/zebra/interface.c
diff options
context:
space:
mode:
authorSharath Ramamurthy <sramamurthy@nvidia.com>2021-07-27 14:54:40 +0530
committerStephen Worley <sworley@nvidia.com>2023-02-13 18:12:04 -0500
commitefde4f25612fb3a690ed1e0ce789a490f949bb2e (patch)
tree50630ce82382f9009ec471472a2ec2d244c103ab /zebra/interface.c
parent239b26f932e5b78828dce8f7fe628c12b7ddbd9f (diff)
zebra: Refactoring changes for zebra_evpn_map_vlan zebra_evpn_from_svi and zl3vni_from_svi
Today to find the vni for a given (vlan, bridge) we walk over all interfaces and filter the vxlan device associated with the bridge. With multiple vlan aware bridge changes, we can derive the vni directly by looking up the hash table i.e. the vlan_table of the associated (vlan, bridge) which would give the vni. During vrf_terminate() call zebra_l2_bridge_if_cleanup if the interface that we are removing is of type bridge. In this case, we walk over all the vlan<->access_bd association and clean them up. zebra_evpn_t is modified to record (vlan, bridge) details and the corresponding vty is modified to print the same. zevpn_bridge_if_set and zl3vni_bridge_if_set is used to set/unset the association. Signed-off-by: Sharath Ramamurthy <sramamurthy@nvidia.com>
Diffstat (limited to 'zebra/interface.c')
-rw-r--r--zebra/interface.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index 2ec1ac1341..b3ae7cf148 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -228,6 +228,7 @@ static int if_zebra_delete_hook(struct interface *ifp)
rtadv_if_fini(zebra_if);
+ zebra_l2_bridge_if_cleanup(ifp);
zebra_evpn_if_cleanup(zebra_if);
zebra_evpn_mac_ifp_del(ifp);