mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 17:18:56 +00:00
Merge pull request #13330 from chiragshah6/fdev1
zebra: EVPN handle duplicate detected local mac delete event
This commit is contained in:
commit
76cd90fb4e
@ -1038,12 +1038,11 @@ int zebra_evpn_macip_send_msg_to_client(vni_t vni,
|
|||||||
char flag_buf[MACIP_BUF_SIZE];
|
char flag_buf[MACIP_BUF_SIZE];
|
||||||
|
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"Send MACIP %s f %s MAC %pEA IP %pIA seq %u L2-VNI %u ESI %s to %s",
|
"Send MACIP %s f %s state %u MAC %pEA IP %pIA seq %u L2-VNI %u ESI %s to %s",
|
||||||
(cmd == ZEBRA_MACIP_ADD) ? "Add" : "Del",
|
(cmd == ZEBRA_MACIP_ADD) ? "Add" : "Del",
|
||||||
zclient_evpn_dump_macip_flags(flags, flag_buf,
|
zclient_evpn_dump_macip_flags(flags, flag_buf,
|
||||||
sizeof(flag_buf)),
|
sizeof(flag_buf)),
|
||||||
macaddr, ip, seq, vni,
|
state, macaddr, ip, seq, vni, es ? es->esi_str : "-",
|
||||||
es ? es->esi_str : "-",
|
|
||||||
zebra_route_string(client->proto));
|
zebra_route_string(client->proto));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1341,16 +1340,26 @@ int zebra_evpn_mac_send_add_to_client(vni_t vni, const struct ethaddr *macaddr,
|
|||||||
int zebra_evpn_mac_send_del_to_client(vni_t vni, const struct ethaddr *macaddr,
|
int zebra_evpn_mac_send_del_to_client(vni_t vni, const struct ethaddr *macaddr,
|
||||||
uint32_t flags, bool force)
|
uint32_t flags, bool force)
|
||||||
{
|
{
|
||||||
|
int state = ZEBRA_NEIGH_ACTIVE;
|
||||||
|
|
||||||
if (!force) {
|
if (!force) {
|
||||||
if (CHECK_FLAG(flags, ZEBRA_MAC_LOCAL_INACTIVE)
|
if (CHECK_FLAG(flags, ZEBRA_MAC_LOCAL_INACTIVE)
|
||||||
&& !CHECK_FLAG(flags, ZEBRA_MAC_ES_PEER_ACTIVE))
|
&& !CHECK_FLAG(flags, ZEBRA_MAC_ES_PEER_ACTIVE))
|
||||||
/* the host was not advertised - nothing to delete */
|
/* the host was not advertised - nothing to delete */
|
||||||
return 0;
|
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))
|
||||||
|
state = ZEBRA_NEIGH_INACTIVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return zebra_evpn_macip_send_msg_to_client(
|
return zebra_evpn_macip_send_msg_to_client(
|
||||||
vni, macaddr, NULL, 0 /* flags */, 0 /* seq */,
|
vni, macaddr, NULL, 0 /* flags */, 0 /* seq */, state, NULL,
|
||||||
ZEBRA_NEIGH_ACTIVE, NULL, ZEBRA_MACIP_DEL);
|
ZEBRA_MACIP_DEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2435,7 +2444,7 @@ int zebra_evpn_del_local_mac(struct zebra_evpn *zevpn, struct zebra_mac *mac,
|
|||||||
|
|
||||||
/* Remove MAC from BGP. */
|
/* Remove MAC from BGP. */
|
||||||
zebra_evpn_mac_send_del_to_client(zevpn->vni, &mac->macaddr, mac->flags,
|
zebra_evpn_mac_send_del_to_client(zevpn->vni, &mac->macaddr, mac->flags,
|
||||||
false /* force */);
|
clear_static /* force */);
|
||||||
|
|
||||||
zebra_evpn_es_mac_deref_entry(mac);
|
zebra_evpn_es_mac_deref_entry(mac);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user