-
Notifications
You must be signed in to change notification settings - Fork 89
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
routing loop due to ignoring linkdown #111
Comments
So what you are saying is that there's a sysctl that tells the kernel to disobey the routing table? I don't see how we could possibly avoid routing loops if the kernel is not obeying the routing table.
Does the |
Hi Juliusz,
On Fri, Oct 27, 2023 at 10:39:24AM -0700, Juliusz Chroboczek wrote:
So what you are saying is that there's a sysctl that tells the kernel to
disobey the routing table?
I'd say babeld's model of how the Linux routing table works is incomplete :)
I don't see how we could possibly avoid routing loops if the kernel is
not obeying the routing table.
I belive (but haven't checked) the kernel will send route change netlink
events when routes become ignored, the `linkdown` (RTNH_F_LINKDOWN) should
be set in those. So it ought to be easy for babeld to react to routes
becoming ignored in this way.
Only problem I see is that (AFAIK) `linkdown` will be set whether or not
the ignore_routes_with_linkdown sysctl is enabled. So ignoring these routes
would have to be made conditional on the sysctl being enabled or a babeld
config parameter (eg. `respect-kernel-linkdown true|false`).
I'd prefer we respect the sysctl by default but allow overriding that
behaviour with a (per-interface) `respect-kernel-linkdown false`.
> We might wan to add an option to honor the linkdown route attribute or one to ignore routes any interfaces that are linkdown.
Does the `link-detect` option do what you want? If you find it useful,
we might make it into a per-interface option.
I'll test that.
Thanks,
--Daniel
|
The role of the routing daemon is not to model the Linux routing table. It's role is to construct a routing table and instruct the kernel to forward packets according to that routing table. If the kernel is configured to ignore the routing daemon's instructions, then routing is going to break.
I'm not opposed to accepting a (tested!) patch that does that. However, I think we should simply document that babeld is not compatible with (As a side note, the reason why Closing this issue, please feel free to reopen it if you think there's anything actionable about it. |
Hi Juliusz,
here's a routing loop I just ran into. I have
sysctl net.ipv6.conf.all.ignore_routes_with_linkdown=1
on my router this is to ignore routes via interfaces that are down at the link level (but administratively up).babeld doesn't seem to know about this kernel feature so it will export routes which are ignored by the kernel. In my case this caused a routing loop. babeld exports a specific route, say /64, another router will use this route to send us traffic, but since the kernel ignores the
linkdown
/64 it falls back to the default route instead, which in my case forms a loop.We might wan to add an option to honor the
linkdown
route attribute or one to ignore routes on any interfaces that are linkdown.--Daniel
The text was updated successfully, but these errors were encountered: