From: Donald Sharp Date: Wed, 30 Oct 2024 17:11:35 +0000 (-0400) Subject: bgpd: In bgp_update() for mac addrs ensure we are dealing with evpn X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=f741b31f27eb4ccfe146ae87a8c448022249215c;p=matthieu%2Ffrr.git bgpd: In bgp_update() for mac addrs ensure we are dealing with evpn The code is just arbitrarily checking to see if there are any mac addresses associated with a prefix. This makes no sense from the perspective that it can only happen as an evpn route. Let's not make non-evpn people pay the price to check this data. Signed-off-by: Donald Sharp --- diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 58550c70c9..4a36f1a26d 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -4889,7 +4889,7 @@ void bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id, goto filtered; } - if (bgp_mac_entry_exists(p) || bgp_mac_exist(&attr->rmac)) { + if (safi == SAFI_EVPN && (bgp_mac_entry_exists(p) || bgp_mac_exist(&attr->rmac))) { peer->stat_pfx_nh_invalid++; reason = "self mac;"; bgp_attr_flush(&new_attr);