Multiple local fix (backport #20798)#20817
Merged
donaldsharp merged 2 commits intostable/10.4from Feb 13, 2026
Merged
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: #20337
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit bf1312b)
…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> (cherry picked from commit 23261aa)
Merged
|
Target branch is not in the allowed branches list. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
This is an automatic backport of pull request #20798 done by Mergify.