summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2024-10-30 13:11:35 -0400
committerDonatas Abraitis <donatas@opensourcerouting.org>2025-03-17 14:57:14 +0200
commitf741b31f27eb4ccfe146ae87a8c448022249215c (patch)
tree33c8e2e7b3fca32bac8ac134b97a70ffd4ee6c97
parent7c791c053c3215d5e600cba7ce61b95b0dfe7c3a (diff)
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 <sharpd@nvidia.com>
-rw-r--r--bgpd/bgp_route.c2
1 files changed, 1 insertions, 1 deletions
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);