-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kernel routes are not updated properly in zebra RIB / nhg nexthop check is wrong #13561
Comments
Hi. We see the same issue. FRRouting 8.5.2, on Linux 6.1.35, Debian 12 We add/delete routes with "ip route". Sometimes FRR continues to advertise one of these kernel routes after it's been deleted, indefinitely. Nothing in FRR logs. Example Route is gone from kernel: cpt-ter-rs2# ip route sh match 102.216.77.157/32 But FRR is still seeing it:
cpt-ter-rs2# show ip bgp 102.216.77.157/32 |
These commits seem to explain that exception (from oldest to newest):
This behavior looks intentional to workaround interfaces going down bringing down other routes. Maybe we are missing stimulus somewhere else to remove these stale routes? |
This issue is stale because it has been open 180 days with no activity. Comment or remove the |
Similar to #9185 ? |
Still, the bug. Are there any updates? |
As per @zdc comment when we remove this check: |
The fix was recently merged -- #17544 P.S.: Thanks to the author |
Describe the bug
In certain conditions, kernel routes are not properly updated in zebra, for example when an IP address is flushed from an interface.
To Reproduce
Reproducing is really simple:
After this, the kernel will have no routes, but FRR still has an active default route:
Logs after
ip -4 addr flush dev eth0
:Expected behavior
FRR should remove a route, if it does not exist in a kernel anymore.
I traced the problem till the
nexthop_active_check()
infrr/zebra/zebra_nhg.c
Line 2565 in 32b20e1
I think the problem is that kernel routes are trusted too much. This check does not seem to be right:
frr/zebra/zebra_nhg.c
Lines 2589 to 2602 in 32b20e1
For example, in this case, an interface status is up, and
goto skip_check
is activated, but there are no IP addresses on this interface.Without this check, everything looks better:
I think the check should be removed or modified to take into account more info than only interface status.
Screenshots
Versions
32b20e1ad65e8db2ef80dd39b255f34de2802cd2
)Additional context
It could be that described problem may be a reason also for:
#11592
#12197
The text was updated successfully, but these errors were encountered: