Skip to content

Multiple local fix (backport #20798)#20817

Merged
donaldsharp merged 2 commits intostable/10.4from
mergify/bp/stable/10.4/pr-20798
Feb 13, 2026
Merged

Multiple local fix (backport #20798)#20817
donaldsharp merged 2 commits intostable/10.4from
mergify/bp/stable/10.4/pr-20798

Conversation

@mergify
Copy link

@mergify mergify bot commented Feb 13, 2026

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.

…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)
@mergify mergify bot mentioned this pull request Feb 13, 2026
@greptile-apps
Copy link

greptile-apps bot commented Feb 13, 2026

Target branch is not in the allowed branches list.

@frrbot frrbot bot added bugfix tests Topotests, make check, etc zebra labels Feb 13, 2026
@donaldsharp donaldsharp merged commit b2401c8 into stable/10.4 Feb 13, 2026
20 of 25 checks passed
@mergify mergify bot deleted the mergify/bp/stable/10.4/pr-20798 branch February 13, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant