summaryrefslogtreecommitdiff
path: root/zebra
diff options
context:
space:
mode:
authorvivek <vivek@cumulusnetworks.com>2020-06-09 22:15:33 -0700
committerDonald Sharp <sharpd@nvidia.com>2024-12-09 12:29:38 -0500
commite2b20dfb3306d48868343587f79133b90b8bd842 (patch)
treec268c3f915e8e2a4f5992cf449645a9aaf4f9171 /zebra
parentc05c2b15e53b00caee4ec7742da3400d3c2d2538 (diff)
zebra: Reset MAC's remote sequence number appropriately
When a MAC gets deleted but associated neighbors remain, the MAC is kept in the zebra MAC database as an internal ("auto") entry. When this happens, reset the MAC's remote sequence number. This ensures that when the host with the MAC later comes up behind a remote VTEP, the local switch accepts the MAC and installs it into the bridge FDB and we don't end up in a situation where remote MACs are not installed into the bridge FDB. This fix is a corollary of CM-22753 and is this time done for local MACs upon delete. Note: Commit is marked Cumulus-only because I need to evalute more comprehensive changes before upstreaming it. Ticket: CM-29581 Reviewed By: As above Testing Done: 1. Multiple rounds of manual testing 2. Two rounds of evpn-smoke, 1 round of precommit Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Acked-by: Chirag Shah <chirag@cumulusnetworks.com> Acked-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to 'zebra')
-rw-r--r--zebra/zebra_evpn_mac.c2
-rw-r--r--zebra/zebra_vxlan.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/zebra/zebra_evpn_mac.c b/zebra/zebra_evpn_mac.c
index 0d53591336..f9009dabb7 100644
--- a/zebra/zebra_evpn_mac.c
+++ b/zebra/zebra_evpn_mac.c
@@ -1152,6 +1152,7 @@ int zebra_evpn_mac_del(struct zebra_evpn *zevpn, struct zebra_mac *mac)
listcount(mac->neigh_list));
SET_FLAG(mac->flags, ZEBRA_MAC_AUTO);
+ mac->rem_seq = 0;
return 0;
}
@@ -2411,6 +2412,7 @@ int zebra_evpn_del_local_mac(struct zebra_evpn *zevpn, struct zebra_mac *mac,
UNSET_FLAG(mac->flags, ZEBRA_MAC_ALL_LOCAL_FLAGS);
UNSET_FLAG(mac->flags, ZEBRA_MAC_STICKY);
SET_FLAG(mac->flags, ZEBRA_MAC_AUTO);
+ mac->rem_seq = 0;
}
return 0;
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index ad112a4ab1..bc4f343898 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -4403,6 +4403,7 @@ static int zebra_vxlan_check_del_local_mac(struct interface *ifp,
UNSET_FLAG(mac->flags, ZEBRA_MAC_ALL_LOCAL_FLAGS);
UNSET_FLAG(mac->flags, ZEBRA_MAC_STICKY);
SET_FLAG(mac->flags, ZEBRA_MAC_AUTO);
+ mac->rem_seq = 0;
}
return 0;