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
Default route from DHCP no longer set after upgrade 235.38 -> 236.0 #7792
Comments
I think you are missing #7432 |
Do you mean it should be fixed by 8dc787d? But shouldn't that be in 236.0? |
yes . But I can't reproduce with current git. |
Turns out I left out one important piece of information in my bug report, apologies for that: In my case the DHCP-Server sets an additional route via DHCP-Option 33 ("Static Route"). When I remove that option, the default route is set. So 5f04a20 does some collateral damage: #5695 is about DHCP-Option 121 ("Classless Static Route"; RFC 3442) but 5f04a20 breaks DHCP-Option 33 ("Static Route" from RFC 2132), as routes from both options end up in the same array ( |
isn't option 33 is deprecated ? |
Well, RFC 3442 says so, but then again its point is making a case for option 121... I can't see a reason for not using it and it was working just fine for all my clients until systemd 236.0. |
@ssahani if option 33 is used in the world we need to support it, it's that easy, regardless if deprecated or not. |
@poettering yes right but we first loop around and set all the routes . @thierer Could you give me a dnsmasq conf . From the code we are extracting n routes that is all the routes. I cant see how that is happening really ? |
@ssahani, sure. These entries to
should result in these routes being set
Which stopped working in 236, the default route is no longer set. Sorry if I'm wrong, but your remarks about "looping around" and "extracting all routes" make me suspect you didn't understand the problem: The problem is not, that any of the routes from options "static-route" (33) or "classless-static-route" (121) are not set - they are. (Which is a separate problem, I'll get to that). The problem is that if a route is set by option "static-route" (33) the default route set by option "router" (3) is discarded. IMHO that's wrong, because RFC 3442 only says this should happen when "Classless Static Route" (121) is used:
Which brings me to my second point, because the RFC also states
That's not happening, which you can test by using
Following the rules of the RFC, this should only set the routes from the "classless-static-route" entry, but in fact the route from "static-route" (to 10.0.0.0/8) is also set. To summarize, I see 3 problems with the current code:
|
The option code 121 and 33 both kept in a array . So we apply them while looping around it .
No we apply both of them I just added debug logs to test them .
Yes we need to fix it
Yes we will add. |
Yes, but as I wrote, that's not the point...
Really? Did you also check that the default route is actually set? Because that's not what I'm experiencing, and looking at the code, I can't see how it would work: This loop iterates through the routes picked up from both "static-route" (option 33) and "classless-static-route" (option 121): systemd/src/network/networkd-dhcp4.c Lines 103 to 124 in 5f04a20
If at least one route got set by any of these two options, systemd/src/network/networkd-dhcp4.c Lines 135 to 181 in 2de2aba
|
No we apply both of them I just added debug logs to test them. I looked at option 3 not option 33 Sorry I misread. Of Course if any of them is there default route won't be applied. That was the commit we did for. |
I don't think so. #5695 ist about ignoring the default route when option 121 is set (which makes sense, because option 121 can also be used to set the default route, so the two could be in conflict). But 5f04a20 also causes the default route via option 3 to be ignored if (only) option 33 is set. Which is neither required by RFC 3442 nor does it make sense, because option 33 can't be used to set the default route. |
option and a Static Routes option, the DHCP client MUST ignore the Static Routes option. Closes systemd#7792
hmm ssahani@765b7bc Does this fixes your issue ? |
I wasn't successful when trying to build a custom package of systemd for Arch, so I can't test it, but from looking at the patch I'd say that should be correct. I still think there should be warnings when routes are discarded, but I'd consider my original issue as fixed. Thanks! |
option and a Static Routes option, the DHCP client MUST ignore the Static Routes option. Closes systemd#7792
option and a Static Routes option, the DHCP client MUST ignore the Static Routes option. Closes systemd#7792
option and a Static Routes option, the DHCP client MUST ignore the Static Routes option. Closes systemd#7792
… given (systemd#7807) When the DHCP server returns both a Classless Static Routes option and a Static Routes option, the DHCP client MUST ignore the Static Routes option. Closes systemd#7792
Submission type
systemd version the issue has been seen with
236.0
Used distribution
Arch Linux
In case of bug report: Expected behaviour you didn't see
235.38
In case of bug report: Unexpected behaviour you saw
236.0
even though the route is apparently correctly received:
In case of bug report: Steps to reproduce the problem
The text was updated successfully, but these errors were encountered: