summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2020-09-22 15:16:52 +0200
committerAnuradha Karuppiah <anuradhak@nvidia.com>2021-02-24 17:11:26 +0100
commit8e1337c5dd101f3740a2389173ec70189274f92d (patch)
treee3c04736b9f15df2f1effd6220155bebca738a91
parentzebra: flush macs linked to the bond when it moves out of bypass (diff)
downloadfrr-8e1337c5dd101f3740a2389173ec70189274f92d.tar.xz
frr-8e1337c5dd101f3740a2389173ec70189274f92d.zip
zebra: del/add remote mac if there is a change from es->non-es dst and vicevera
This is needed as kernel currently doesn't allow a mac replace if the dst changes from a L2NHG to a single-VTEP and viceversa. Ticket: CM-31561 Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
-rw-r--r--zebra/zebra_evpn_mac.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/zebra/zebra_evpn_mac.c b/zebra/zebra_evpn_mac.c
index 58b291953..142a199bd 100644
--- a/zebra/zebra_evpn_mac.c
+++ b/zebra/zebra_evpn_mac.c
@@ -2010,6 +2010,8 @@ int process_mac_remote_macip_add(zebra_evpn_t *zevpn, struct zebra_vrf *zvrf,
esi_t *old_esi;
bool old_static = false;
zebra_mac_t *mac;
+ bool old_es_present;
+ bool new_es_present;
sticky = !!CHECK_FLAG(flags, ZEBRA_MACIP_TYPE_STICKY);
remote_gw = !!CHECK_FLAG(flags, ZEBRA_MACIP_TYPE_GW);
@@ -2073,7 +2075,16 @@ int process_mac_remote_macip_add(zebra_evpn_t *zevpn, struct zebra_vrf *zvrf,
zevpn, mac, seq, ipa_len, ipaddr, false))
return -1;
+ old_es_present = !!mac->es;
zebra_evpn_es_mac_ref(mac, esi);
+ new_es_present = !!mac->es;
+ /* XXX - dataplane is curently not able to handle a MAC
+ * replace if the destination changes from L2-NHG to
+ * single VTEP and vice-versa. So delete the old entry
+ * and re-install
+ */
+ if (old_es_present != new_es_present)
+ zebra_evpn_rem_mac_uninstall(zevpn, mac, false);
}
/* Check MAC's curent state is local (this is the case