]> git.proxmox.com Git - mirror_frr.git/commit - lib/nexthop.h
bgpd: VRF-Lite fix nexthop type
authorKantesh Mundaragi <kmundaragi@vmware.com>
Tue, 24 Aug 2021 14:53:29 +0000 (07:53 -0700)
committerIqra Siddiqui <imujeebsiddi@vmware.com>
Tue, 7 Sep 2021 08:50:06 +0000 (01:50 -0700)
commit0789eb69e5b4b1d0b9040cea79cd047ce77b9406
treea4ad88bd20b7c777fb6c974cee26ea7d9343878e
parentd9377cb626984301bcf1a2e4f12672e52ef97f50
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>
bgpd/bgp_attr.c
bgpd/bgp_attr.h
bgpd/bgp_route.c
bgpd/bgp_route.h
bgpd/bgp_zebra.c
lib/nexthop.c
lib/nexthop.h
tests/lib/test_nexthop.c
zebra/zapi_msg.c
zebra/zebra_vty.c