diff options
author | Donald Sharp <sharpd@nvidia.com> | 2024-10-30 18:11:35 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2024-10-31 15:35:01 +0100 |
commit | e3519b340055af77efa5f1f3d4a5ae7b473240da (patch) | |
tree | 430f3ad76d87953559208f03925b5c04a1333f68 /bgpd/bgp_route.c | |
parent | bgpd: In bgp_update try to optimize is_loop_check variable (diff) | |
download | frr-e3519b340055af77efa5f1f3d4a5ae7b473240da.tar.xz frr-e3519b340055af77efa5f1f3d4a5ae7b473240da.zip |
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>
Diffstat (limited to 'bgpd/bgp_route.c')
-rw-r--r-- | bgpd/bgp_route.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 814910f9c..dbd1c3cf2 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -4932,7 +4932,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); |