Multiple local fix - #20798
Conversation
β¦anges
Currently when a interface is seeing multiple link up events in a row,
we are seeing multiple local routes in the rib:
r9# show ip route vrf all nexthop-group
% 2026/02/08 23:18:00.371
Codes: K - kernel route, C - connected, L - local, S - static,
R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric, t - Table-Direct,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
IPv4 unicast VRF default:
C>* 11.1.5.0/30 (7) is directly connected, r9-eth0, weight 1, 00:01:52
L>* 11.1.5.2/32 (7) is directly connected, r9-eth0, weight 1, 00:01:52
B>* 50.1.1.7/32 [20/0] (10) via 11.1.5.1, r9-eth0, weight 1, 00:01:51
B>* 50.1.1.8/32 [20/0] (10) via 11.1.5.1, r9-eth0, weight 1, 00:01:51
L * 50.1.1.9/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46
C * 50.1.1.9/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46
L>* 50.1.1.9/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46
B>* 50.1.1.10/32 [20/0] (10) via 11.1.5.1, r9-eth0, weight 1, 00:01:50
L * 198.10.1.1/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46
C * 198.10.1.1/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46
L>* 198.10.1.1/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46
B 198.10.1.1/32 [20/0] (10) via 11.1.5.1, r9-eth0, weight 1, 00:01:46
Additionally FRR has made an improper choice about what route should also
be properly selected, because of this decision. The problem stems from
rib_compare_routes in zebra_rib.c already handling the multiple same
connected routes being passed for processing but not for local routes
to be considered the same. Modify the code to make local routes behave
the same here. This is the new result:
r9# show ip route vrf all nexthop-group
% 2026/02/08 23:18:00.371
Codes: K - kernel route, C - connected, L - local, S - static,
R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric, t - Table-Direct,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
IPv4 unicast VRF default:
C>* 11.1.5.0/30 (7) is directly connected, r9-eth0, weight 1, 00:01:52
L>* 11.1.5.2/32 (7) is directly connected, r9-eth0, weight 1, 00:01:52
B>* 50.1.1.7/32 [20/0] (10) via 11.1.5.1, r9-eth0, weight 1, 00:01:51
B>* 50.1.1.8/32 [20/0] (10) via 11.1.5.1, r9-eth0, weight 1, 00:01:51
C>* 50.1.1.9/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46
L>* 50.1.1.9/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46
B>* 50.1.1.10/32 [20/0] (10) via 11.1.5.1, r9-eth0, weight 1, 00:01:50
C>* 198.10.1.1/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46
L>* 198.10.1.1/32 (17) is directly connected, r9-eth1, weight 1, 00:01:46
Fixes: FRRouting#20337
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
mjstapp
left a comment
There was a problem hiding this comment.
I like this fix - let's see how CI goes
Greptile OverviewGreptile SummaryThis PR fixes a bug where multiple interface link-up events caused duplicate local routes in the RIB. The fix extends the route comparison logic in Key changes:
The fix is minimal, targeted, and consistent with the existing pattern at line 1654 where both route types are already handled together. Confidence Score: 5/5
Important Files Changed
|
1cb5fe6 to
2df291e
Compare
β¦local routes Show that the previous commit works properly and that when FRR receives a change for a interface that causes multiple event up scenarios, to treat the local routes as duplicate. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2df291e to
23261aa
Compare
|
@Mergifyio backport dev/10.6 stable/10.5 stable/10.4 stable/10.3 stable/10.2 stable/10.1 stable/10.0 |
β Backports have been createdDetails
Cherry-pick of 23261aa has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
Cherry-pick of bf1312b has failed: Cherry-pick of 23261aa has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
Cherry-pick of bf1312b has failed: Cherry-pick of 23261aa has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Multiple local fix (backport #20798)
Multiple local fix (backport #20798)
Multiple local fix (backport #20798)
Multiple local fix (backport #20798)
See first commit, but explicilty fix the problem where when receiving multiple link up events FRR is creating multpile local routes when it should not be.