Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bgpd: fix route installation whereas nexthop group is uninstalled
The test bgp_multi_vrf_topo2 testfails, because BGP fails to install 2 selected BGP routes in the ZEBRA FIB: > r2# show bgp vrf RED_A > [..] > *>i 1::1/128 ::ffff:a00:11 0 100 0 500 ? > *>i 1::2/128 ::ffff:a00:11 0 100 0 500 ? There are 2 nexthops groups associated to the BGP paths: > # show bgp vrf RED_A nexthop-group details > [..] > ID: 75757653, #paths 2 > Flags: 0x0003 (allowRecursion, internalBgp) > State: 0x0000 > via ::ffff:a00:11 (vrf RED_A) inactive, weight 1 > dependents 75757655 > Paths: > 2/1 1::2/128 VRF RED_A flags 0x418 > 2/1 1::1/128 VRF RED_A flags 0x418 > ID: 75757655, #paths 2 > Flags: 0x000b (allowRecursion, internalBgp, TypeGroup) > State: 0x0000 > depends count 1 > depends 75757653 > Paths: > 2/1 1::2/128 VRF RED_A flags 0x418 > 2/1 1::1/128 VRF RED_A flags 0x418 The nexthop groups could not be installed. When ZEBRA received the NHG_ADD message for ::ffff:a00:11, it failed to install a dependent nexthop: > 2024/03/28 10:36:45 ZEBRA: [VKWCR-QB19H] zebra_nhg_free: nhe 0x562597764120 (75757649[]), refcnt 0, NH ::ffff:a00:11, via r2-r1-eth0 > 2024/03/28 10:36:45 ZEBRA: [WVJCK-PPMGD][EC 4043309093] netlink-dp (NS 0) error: No route to host, type=RTM_NEWNEXTHOP(104), seq=558, pid=4061791196 > [..] > 2024/03/28 10:36:45 ZEBRA: [J7K9Z-9M7DT] Nexthop dplane ctx 0x5625977757a0, op NH_INSTALL, nexthop ID (109), result FAILURE > 2024/03/28 10:36:45 ZEBRA: [X5XE1-RS0SW][EC 4043309074] Failed to install Nexthop (109[::ffff:a00:11 if 2 vrfid 6]) into the kernel Actually, BGP tried to install an IPv6 mapped ipv4 address, whereas there are no ipv6 routes to that address. Adding to this, it is not possible to attach an IPv6 route to an IPv4 nexthop. Let us BGP use the regular ROUTE_ADD facility. Signed-off-by: Philippe Guibert <[email protected]>
- Loading branch information