summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_route.h
diff options
context:
space:
mode:
authorKantesh Mundaragi <kmundaragi@vmware.com>2021-08-24 16:53:29 +0200
committerIqra Siddiqui <imujeebsiddi@vmware.com>2021-09-07 10:50:06 +0200
commit0789eb69e5b4b1d0b9040cea79cd047ce77b9406 (patch)
treea4ad88bd20b7c777fb6c974cee26ea7d9343878e /bgpd/bgp_route.h
parentMerge pull request #9557 from idryzhov/bgp-view-cleanup (diff)
downloadfrr-0789eb69e5b4b1d0b9040cea79cd047ce77b9406.tar.xz
frr-0789eb69e5b4b1d0b9040cea79cd047ce77b9406.zip
bgpd: VRF-Lite fix nexthop type
Description: Change is intended for fixing the following issues related to vrf route leaking: Routes with special nexthops i.e. blackhole/sink routes when imported, are not programmed into the FIB and corresponding nexthop is set as 'inactive', nexthop interface as 'unknown'. While importing/leaking routes between VRFs, in case of special nexthop(ipv4/ipv6) once bgp announces route(s) to zebra, nexthop type is incorrectly set as NEXTHOP_TYPE_IPV6_IFINDEX/NEXTHOP_TYPE_IFINDEX i.e. directly connected even though we are not able to resolve through an interface. This leads to nexthop_active_check marking nexthop !NEXTHOP_FLAG_ACTIVE. Unable to find the active nexthop(s), route is not programmed into the FIB. Whenever BGP leaks routes, set the correct nexthop type, so that route gets resolved and correctly programmed into the FIB, in the imported vrf. Co-authored-by: Kantesh Mundaragi <kmundaragi@vmware.com> Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
Diffstat (limited to 'bgpd/bgp_route.h')
-rw-r--r--bgpd/bgp_route.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/bgpd/bgp_route.h b/bgpd/bgp_route.h
index 75da2723e..d052a3f40 100644
--- a/bgpd/bgp_route.h
+++ b/bgpd/bgp_route.h
@@ -642,8 +642,9 @@ extern bool bgp_maximum_prefix_overflow(struct peer *, afi_t, safi_t, int);
extern void bgp_redistribute_add(struct bgp *bgp, struct prefix *p,
const union g_addr *nexthop, ifindex_t ifindex,
enum nexthop_types_t nhtype, uint8_t distance,
- uint32_t metric, uint8_t type,
- unsigned short instance, route_tag_t tag);
+ enum blackhole_type bhtype, uint32_t metric,
+ uint8_t type, unsigned short instance,
+ route_tag_t tag);
extern void bgp_redistribute_delete(struct bgp *, struct prefix *, uint8_t,
unsigned short);
extern void bgp_redistribute_withdraw(struct bgp *, afi_t, int, unsigned short);