summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_evpn_mh.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--zebra/zebra_evpn_mh.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/zebra/zebra_evpn_mh.c b/zebra/zebra_evpn_mh.c
index 249a2f0aa..5a28ee10c 100644
--- a/zebra/zebra_evpn_mh.c
+++ b/zebra/zebra_evpn_mh.c
@@ -2682,6 +2682,7 @@ static void zebra_evpn_es_bypass_update_macs(struct zebra_evpn_es *es,
zebra_mac_t *mac;
struct listnode *node;
struct listnode *nnode;
+ struct zebra_if *zif;
/* Flush all MACs linked to the ES */
for (ALL_LIST_ELEMENTS(es->mac_list, node, nnode, mac)) {
@@ -2696,6 +2697,25 @@ static void zebra_evpn_es_bypass_update_macs(struct zebra_evpn_es *es,
es->esi_str);
zebra_evpn_flush_local_mac(mac, ifp);
}
+
+ /* While in bypass-mode locally learnt MACs are linked
+ * to the access port instead of the ES
+ */
+ zif = ifp->info;
+ if (!zif->mac_list)
+ return;
+
+ for (ALL_LIST_ELEMENTS(zif->mac_list, node, nnode, mac)) {
+ if (!CHECK_FLAG(mac->flags, ZEBRA_MAC_LOCAL))
+ continue;
+
+ if (IS_ZEBRA_DEBUG_EVPN_MH_MAC)
+ zlog_debug("VNI %u mac %pEA %s update ifp %s",
+ mac->zevpn->vni,
+ &mac->macaddr,
+ bypass ? "bypass" : "non-bypass", ifp->name);
+ zebra_evpn_flush_local_mac(mac, ifp);
+ }
}
void zebra_evpn_es_bypass_update(struct zebra_evpn_es *es,