]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra:check DAD freeze action before notifying bgp 17737/head
authorChirag Shah <chirag@nvidia.com>
Wed, 1 Nov 2023 05:11:04 +0000 (22:11 -0700)
committerChirag Shah <chirag@nvidia.com>
Mon, 30 Dec 2024 22:39:27 +0000 (14:39 -0800)
If Duplicate Address Detection action is freeze
(permanent or definite time means not warn only mode)
then locally duplicate detected MAC delete notification
is not require to inform,
instead ask BGP to sync previous remote MAC entry.
In freeze case local MAC event is not known to BGP,
instead BGP is pointing to remote VTEP for the MAC.

Ticket: #3652383
Issue: 3652383

Signed-off-by: Chirag Shah <chirag@nvidia.com>
zebra/zebra_evpn_mac.c

index f9009dabb75b63f4e204b12dcbfe0b057a387f37..3fd84b5257c8910bc83a6be0a8cf9930eee705a9 100644 (file)
@@ -1323,6 +1323,7 @@ int zebra_evpn_mac_send_del_to_client(vni_t vni, const struct ethaddr *macaddr,
                                      uint32_t flags, bool force)
 {
        int state = ZEBRA_NEIGH_ACTIVE;
+       struct zebra_vrf *zvrf;
 
        if (!force) {
                if (CHECK_FLAG(flags, ZEBRA_MAC_LOCAL_INACTIVE) &&
@@ -1330,12 +1331,14 @@ int zebra_evpn_mac_send_del_to_client(vni_t vni, const struct ethaddr *macaddr,
                        /* the host was not advertised - nothing  to delete */
                        return 0;
 
-               /* MAC is LOCAL and DUP_DETECTED, this local mobility event
-                * is not known to bgpd. Upon receiving local delete
-                * ask bgp to reinstall the best route (remote entry).
+               /* Duplicate detect action is freeze enabled and
+                * Local MAC is duplicate deteced, this local
+                * mobility event is not known to bgpd.
+                * Upon receiving local delete ask bgp to reinstall
+                * the best route (remote entry).
                 */
-               if (CHECK_FLAG(flags, ZEBRA_MAC_LOCAL) &&
-                   CHECK_FLAG(flags, ZEBRA_MAC_DUPLICATE))
+               zvrf = zebra_vrf_get_evpn();
+               if (zvrf && zvrf->dad_freeze && CHECK_FLAG(flags, ZEBRA_MAC_DUPLICATE))
                        state = ZEBRA_NEIGH_INACTIVE;
        }