Skip to content

Commit

Permalink
zebra:check DAD freeze action before notifying bgp
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
chiragshah6 committed Dec 30, 2024
1 parent 8d8f73e commit 9a48515
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions zebra/zebra_evpn_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1323,19 +1323,22 @@ 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) &&
!CHECK_FLAG(flags, ZEBRA_MAC_ES_PEER_ACTIVE))
/* 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).
*/
if (CHECK_FLAG(flags, ZEBRA_MAC_LOCAL) &&
CHECK_FLAG(flags, ZEBRA_MAC_DUPLICATE))
/* 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).
*/
zvrf = zebra_vrf_get_evpn();
if (zvrf && zvrf->dad_freeze && CHECK_FLAG(flags, ZEBRA_MAC_DUPLICATE))
state = ZEBRA_NEIGH_INACTIVE;
}

Expand Down

0 comments on commit 9a48515

Please sign in to comment.