-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
DHCPv6 client ignores packets with invalid bytes at the end #28183
Comments
Sample pcap file: |
I have the same issue on OCI and can see extra logs on systemd version 252.5-2ubuntu3.
|
|
@yuwata, I don't think @triatic's case is the same as mine. You're suggesting that something is wrong with the response, but I don't see any issues. Just to be sure I enabled rapid commit in dhclient (by setting I still believe there is a bug in systemd-networkd. |
@dop251 why do you believe my issue is different to yours?
And yes, I can get an IP address with |
Ah, the issue should be a duplicate of the report in PR #28138. Please test the PR. |
BTW, if I understand correctly, the issue should be in the server side. Please report the issue to Oracle. |
Hm... Indeed, there is a trailing zero byte, but it's got nothing to do with rapid commit, I can see it in every message coming from the server, even when rapid commit is not used. The PR looks like it should fix it, but I have no idea how to try it in Ubuntu 22.04. |
I will report this to OCI support, but I have the feeling chances of them fixing it are even slimmer than getting this PR into Ubuntu 22.04 :) @triatic sorry, I was thrown off by the lack of error messages that you're seeing, but now looking at the code I realised they had been added after 249.11. So yes, looks like you're facing the same issue. |
Oracle Cloud sends malformed DHCPv6 replies that have an invalid byte at the end, which cannot be parsed as an option code. networkd currently can cope with the invalid option (it is ignored), but the whole packet is ignored altogether because of the additional null at the end. It's better to be liberal in what we accept and actually assign an address, given that the reply contains a valid IA_NA. Fixes systemd#28183.
Please request to Ubuntu to backport #28138. |
@dop251 no problem! It is nice to see that the cause of the issue is coming to light. I spent a long time with Oracle Support discussing it, but in the end they advised me to configure the IP address statically and forget about DHCPv6 altogether. 🤷♂️ They posted the same advice on their forum: https://community.oracle.com/customerconnect/discussion/687610/oci-ipv6-address-not-assigned-to-oci-ubuntu-instance-by-dhcp |
Update: In a rather shocking development, Oracle have actually fixed the problem in response to my support request. Not sure if the fix is global or only applies to my instance, but you should give it a try, @triatic |
Thank you for the heads up @dop251 , I can confirm a fresh Good news. |
Oracle Cloud sends malformed DHCPv6 replies that have an invalid byte at the end, which cannot be parsed as an option code. networkd currently can cope with the invalid option (it is ignored), but the whole packet is ignored altogether because of the additional null at the end. It's better to be liberal in what we accept and actually assign an address, given that the reply contains a valid IA_NA. Fixes systemd#28183. (cherry picked from commit 81b7335) (cherry picked from commit a11a001) (cherry picked from commit 983f418)
Oracle Cloud sends malformed DHCPv6 replies that have an invalid byte at the end, which cannot be parsed as an option code. networkd currently can cope with the invalid option (it is ignored), but the whole packet is ignored altogether because of the additional null at the end. It's better to be liberal in what we accept and actually assign an address, given that the reply contains a valid IA_NA. Fixes systemd#28183. (cherry picked from commit 81b7335) (cherry picked from commit a11a001)
Oracle Cloud sends malformed DHCPv6 replies that have an invalid byte at the end, which cannot be parsed as an option code. networkd currently can cope with the invalid option (it is ignored), but the whole packet is ignored altogether because of the additional null at the end. It's better to be liberal in what we accept and actually assign an address, given that the reply contains a valid IA_NA. Fixes systemd#28183. (cherry picked from commit 81b7335)
systemd version the issue has been seen with
249.11
Used distribution
Ubuntu jammy
Linux kernel version used
5.15.0-1035-oracle
CPU architectures issue was seen on
aarch64
Component
systemd-networkd
Expected behaviour you didn't see
I'm running an OCI instance with dhcp6 client enabled. Starting from Jun 1 the IPv6 lease cannot be renewed. I'm not sure if I upgraded Ubuntu on that date or Oracle changed something on the server, still the current situation is such that I can see valid SOLICIT requests being sent, and valid REPLY messages are coming back, however they seem to be simply ignored by systemd-networkd. Nothing in the log file, even with debug enabled.
I used strace to confirm that the message is received by systemd-networkd process and indeed it is. dhclient works just fine in the same configuration, however it does not use rapid-commit.
Unexpected behaviour you saw
No response
Steps to reproduce the problem
No response
Additional program output to the terminal or log subsystem illustrating the issue
The text was updated successfully, but these errors were encountered: