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>
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);