mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-09 09:47:11 +00:00
zebra: send ipv4 singlepath delete messages to kernel without nexthop
Problem reported was stale routes left in the kernel in certain cases when overlapping static routes were used and links were bounced. The problem was determined to be an issue where the nexthop was changed due to recursion as the link is going down, and the next-hop at the time of deletion doesn't match what was previously installed by the kernel. This caused the kernel to reject the deletion and the route stuck around. It was pointed out that the kernel doesn't actually require a next-hop value on the netlink deletion call. In this fix, we are eliminating the nexthop for RTM_DELROUTE messages to the kernel in the ipv4 singlepath case. This approach could also be valid for other cases but the fix as is resolved the reported failure case. More testing should be performed before similar changes are made for other cases. Testing included manual testing for the failure condition as well as complete bgp-smoke and ospf-smoke tests with no new failures. Ticket: CM-13328 Signed-off-by: Don Slice <dslice@cumulusnetworks.com> Reviewed-by: CCR-5562
This commit is contained in:
parent
64a608dbae
commit
659b52a845
@ -777,8 +777,10 @@ _netlink_route_build_singlepath(
|
|||||||
if (nexthop->type == NEXTHOP_TYPE_IPV4
|
if (nexthop->type == NEXTHOP_TYPE_IPV4
|
||||||
|| nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX)
|
|| nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX)
|
||||||
{
|
{
|
||||||
_netlink_route_nl_add_gateway_info (rtmsg->rtm_family, AF_INET, nlmsg,
|
/* Send deletes to the kernel without specifying the next-hop */
|
||||||
req_size, bytelen, nexthop);
|
if (cmd != RTM_DELROUTE)
|
||||||
|
_netlink_route_nl_add_gateway_info (rtmsg->rtm_family, AF_INET, nlmsg,
|
||||||
|
req_size, bytelen, nexthop);
|
||||||
|
|
||||||
if (cmd == RTM_NEWROUTE)
|
if (cmd == RTM_NEWROUTE)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user