]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Reset MAC's remote sequence number appropriately
authorvivek <vivek@cumulusnetworks.com>
Wed, 10 Jun 2020 05:15:33 +0000 (22:15 -0700)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 9 Dec 2024 17:29:38 +0000 (12:29 -0500)
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>
zebra/zebra_evpn_mac.c
zebra/zebra_vxlan.c

index 0d53591336f884301568d02ea74f04d994e479e9..f9009dabb75b63f4e204b12dcbfe0b057a387f37 100644 (file)
@@ -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;
index ad112a4ab1f4a677402b2429a0e7421d57b86f9a..bc4f3438983697fd9a66cc42a05de020ba7174c5 100644 (file)
@@ -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;