summaryrefslogtreecommitdiff
path: root/bgpd/bgp_evpn.h
diff options
context:
space:
mode:
authorAmeya Dharkar <adharkar@vmware.com>2019-11-13 16:46:56 -0800
committerAmeya Dharkar <adharkar@vmware.com>2019-11-15 10:15:14 -0800
commit7c312383ba8224d60ebd8616e4ece33526f13ebf (patch)
tree30af5057231497e896e2799e734ed6e38b598214 /bgpd/bgp_evpn.h
parentb6af40b98a5ed65b4b78e6cda650941e5bfdfa7d (diff)
bgpd: Add nexthop of received EVPN RT-5 for nexthop tracking
Problem statement: When IPv4/IPv6 prefixes are received in BGP, bgp_update function registers the nexthop of the route with nexthop tracking module. The BGP route is marked as valid only if the nexthop is resolved. Even for EVPN RT-5, route should be marked as valid only if the the nexthop is resolvable. Code changes: 1. Add nexthop of EVPN RT-5 for nexthop tracking. Route will be marked as valid only if the nexthop is resolved. 2. Only the valid EVPN routes are imported to the vrf. 3. When nht update is received in BGP, make sure that the EVPN routes are imported/unimported based on the route becomes valid/invalid. Testcases: 1. At rtr-1, advertise EVPN RT-5 with a nexthop 10.100.0.2. 10.100.0.2 is resolved at rtr-2 in default vrf. At rtr-2, remote EVPN RT-5 should be marked as valid and should be imported into vrfs. 2. Make the nexthop 10.100.0.2 unreachable at rtr-2 Remote EVPN RT-5 should be marked as invalid and should be unimported from the vrfs. As this code change deals with EVPN type-5 routes only, other EVPN routes should be valid. 3. At rtr-2, add a static route to make nexthop 10.100.0.2 reachable. EVPN RT-5 should again become valid and should be imported into the vrfs. Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
Diffstat (limited to 'bgpd/bgp_evpn.h')
-rw-r--r--bgpd/bgp_evpn.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/bgpd/bgp_evpn.h b/bgpd/bgp_evpn.h
index 6d1e8cd31b..798c3e59bc 100644
--- a/bgpd/bgp_evpn.h
+++ b/bgpd/bgp_evpn.h
@@ -191,5 +191,6 @@ extern void bgp_evpn_cleanup_on_disable(struct bgp *bgp);
extern void bgp_evpn_cleanup(struct bgp *bgp);
extern void bgp_evpn_init(struct bgp *bgp);
extern int bgp_evpn_get_type5_prefixlen(struct prefix *pfx);
+extern bool bgp_evpn_is_prefix_nht_supported(struct prefix *pfx);
#endif /* _QUAGGA_BGP_EVPN_H */