]> git.proxmox.com Git - mirror_frr.git/commit - bgpd/bgp_evpn.h
bgpd: Add nexthop of received EVPN RT-5 for nexthop tracking
authorAmeya Dharkar <adharkar@vmware.com>
Thu, 14 Nov 2019 00:46:56 +0000 (16:46 -0800)
committerAmeya Dharkar <adharkar@vmware.com>
Fri, 15 Nov 2019 18:15:14 +0000 (10:15 -0800)
commit7c312383ba8224d60ebd8616e4ece33526f13ebf
tree30af5057231497e896e2799e734ed6e38b598214
parentb6af40b98a5ed65b4b78e6cda650941e5bfdfa7d
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>
bgpd/bgp_attr.h
bgpd/bgp_evpn.c
bgpd/bgp_evpn.h
bgpd/bgp_nht.c
bgpd/bgp_route.c