Merge pull request #6463 from vivek-cumulus/evpn_extend_nht

bgpd: Extend EVPN next hop tracking for additional EVPN routes
This commit is contained in:
Sri Mohana Singamsetty 2020-05-26 08:18:29 -07:00 committed by GitHub
commit 06fba5cb4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6310,16 +6310,17 @@ bool bgp_evpn_is_prefix_nht_supported(const struct prefix *pfx)
struct prefix_evpn *evp = (struct prefix_evpn *)pfx; struct prefix_evpn *evp = (struct prefix_evpn *)pfx;
/* /*
* EVPN RT-5 should not be marked as valid and imported to vrfs if the * EVPN routes should be marked as valid only if the nexthop is
* BGP nexthop is not reachable. To check for the nexthop reachability, * reachable. Only if this happens, the route should be imported
* Add nexthop for EVPN RT-5 for nexthop tracking. * (into VNI or VRF routing tables) and/or advertised.
* * Note: This is currently applied for EVPN type-2, type-3 and
* Ideally, a BGP route should be marked as valid only if the * type-5 routes. It may be tweaked later on for other routes, or
* nexthop is reachable. Thus, other EVPN route types also should be * even removed completely when all routes are handled.
* added here after testing is performed for them.
*/ */
if (pfx && pfx->family == AF_EVPN && if (pfx && pfx->family == AF_EVPN &&
evp->prefix.route_type == BGP_EVPN_IP_PREFIX_ROUTE) (evp->prefix.route_type == BGP_EVPN_MAC_IP_ROUTE ||
evp->prefix.route_type == BGP_EVPN_IMET_ROUTE ||
evp->prefix.route_type == BGP_EVPN_IP_PREFIX_ROUTE))
return true; return true;
return false; return false;