summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_evpn_mac.c
diff options
context:
space:
mode:
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2020-07-29 20:55:19 +0200
committerAnuradha Karuppiah <anuradhak@nvidia.com>2020-12-21 17:41:17 +0100
commitc1735c08c982136a14a67da42f456b418b81d6b0 (patch)
tree2fd144ca4ec9db99dcfe83a7c7a2871396503628 /zebra/zebra_evpn_mac.c
parentzebra: advertise stale neighs if EVPN-MH is not enabled (diff)
downloadfrr-c1735c08c982136a14a67da42f456b418b81d6b0.tar.xz
frr-c1735c08c982136a14a67da42f456b418b81d6b0.zip
zebra: fix a problem with local MAC pointing to a remote ES
If a remote MAC update is rxed from BGP with a lower sequence number than the local one zebra ignores the MAC update. This typically happens if there is a race condition (where updates are in flight from zebra to BGP). There was a bug in zebra because of which the dest ES was being updated before this check. This left the local MAC pointing to a remote ES. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Relevant Dumps: =============== root@leaf21:mgmt:~# net show evpn mac vni 101101 mac 00:93:00:00:00:01 MAC: 00:93:00:00:00:01 ESI: 03:00:00:00:77:01:03:00:00:0d Intf: - VLAN: 101 Sync-info: neigh#: 1 peer-proxy Local Seq: 3 Remote Seq: 0 Neighbors: 21.1.13.1 Active root@leaf21:mgmt:~# net sho evpn es Type: L local, R remote, N non-DF ESI Type ES-IF VTEPs 03:00:00:00:77:01:02:00:00:0c R - 6.0.0.10,6.0.0.11 03:00:00:00:77:01:03:00:00:0d R - 6.0.0.10,6.0.0.11,6.0.0.12 03:00:00:00:77:01:04:00:00:0e R - 6.0.0.10,6.0.0.11,6.0.0.12,6.0.0.13 03:00:00:00:77:02:02:00:00:16 LR bondP2-H2 6.0.0.15 03:00:00:00:77:02:03:00:00:17 LR bondP2-H3 6.0.0.15,6.0.0.16 03:00:00:00:77:02:04:00:00:18 LR bondP2-H4 6.0.0.15,6.0.0.16,6.0.0.17 root@leaf21:mgmt:~# Relevant logs: =============== 2020/07/29 15:41:27.110846 ZEBRA: Recv MACIP ADD VNI 101101 MAC 00:93:00:00:00:01 IP 21.1.13.1 flags 0x0 seq 2 VTEP 0.0.0.0 ESI 03:00:00:00:77:01:03:00:00:0d from bgp 2020/07/29 15:41:27.110867 ZEBRA: Ignore remote MACIP ADD VNI 101101 MAC 00:93:00:00:00:01 IP 21.1.13.1 as existing MAC has higher seq 3 flags 0x401 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Ticket: CM-30273 Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_evpn_mac.c')
-rw-r--r--zebra/zebra_evpn_mac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/zebra/zebra_evpn_mac.c b/zebra/zebra_evpn_mac.c
index 44394b95a..d72f70586 100644
--- a/zebra/zebra_evpn_mac.c
+++ b/zebra/zebra_evpn_mac.c
@@ -1828,8 +1828,6 @@ int process_mac_remote_macip_add(zebra_evpn_t *zevpn, struct zebra_vrf *zvrf,
if (ipa_len)
SET_FLAG(mac->flags, ZEBRA_MAC_AUTO);
} else {
- zebra_evpn_es_mac_ref(mac, esi);
-
/* When host moves but changes its (MAC,IP)
* binding, BGP may install a MACIP entry that
* corresponds to "older" location of the host
@@ -1858,6 +1856,8 @@ int process_mac_remote_macip_add(zebra_evpn_t *zevpn, struct zebra_vrf *zvrf,
tmp_seq, mac->flags);
return -1;
}
+
+ zebra_evpn_es_mac_ref(mac, esi);
}
/* Check MAC's curent state is local (this is the case