diff options
| author | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2020-09-22 06:16:52 -0700 |
|---|---|---|
| committer | Anuradha Karuppiah <anuradhak@nvidia.com> | 2021-02-24 08:11:26 -0800 |
| commit | 8e1337c5dd101f3740a2389173ec70189274f92d (patch) | |
| tree | e3c04736b9f15df2f1effd6220155bebca738a91 /zebra/zebra_evpn_mac.c | |
| parent | fd40906be90e65273df96dca29b9e7134499468a (diff) | |
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>
Diffstat (limited to 'zebra/zebra_evpn_mac.c')
| -rw-r--r-- | zebra/zebra_evpn_mac.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/zebra/zebra_evpn_mac.c b/zebra/zebra_evpn_mac.c index 58b2919533..142a199bd7 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 |
