-
Notifications
You must be signed in to change notification settings - Fork 754
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
rc.newwanipv6 exits early if ISP only provides a prefix (no WAN ipv6) unless "Request only an IPv6 prefix" is checked #7202
Comments
Just as a preliminary question: if request only a prefix is checked it works as intended? |
Yes, if "Request only an IPv6 prefix" is checked then everything works properly, or at least I have not been able to reproduce the issue with that option checked. I'm not sure if this is a bug or WAI. I will say that I burned up many many hours trying to figure out what the issue was before I dug into the code to figure this out. At a minimum we should update the documentation for this option to say that it must be checked if the ISP only delegates a prefix. |
Thanks for clarifying. We did remove a couple of technical edge cases over the years and detecting the link local as valid was one of the simplifications relatively recent. Maybe we can simplify this further. From what we know now there’s no downside of the approach. |
… or not #7202 The metric is flawed, because there could be a prefix or not, it could shift or the user specified a client setting the server did not accept. This is an experimental change that will stay on the development version for a while.
Apparently also needs c7d6f53, I'll fix up the instructions above. |
I applied these patches and tried two things. First, I disabled the "Request only an IPv6 prefix" and rebooted the machine. radvd seems to be advertising properly on the LAN and my devices have ipv6 GUAs. Next I tried reloading the WAN interface through Interfaces > Overview. This also worked and radvd is advertising properly. I'm also not seeing any logs like this now:
|
Yep, looks good so far. There may be a tweak or two that we could make still, but need to ponder a bit about it and wait for other people's feedback. |
… or not #7202 The metric is flawed, because there could be a prefix or not, it could shift or the user specified a client setting the server did not accept. This is an experimental change that will stay on the development version for a while.
Due to lack of further feedback and generally working fine in real world environments let's put this in 24.1.5. |
Thanks for fixing :) |
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
Describe the bug
I am running version 24.1_1, but this also affected me on 23.7.12. I'm new to opnsense, so I don't have data from earlier releases.
If the ISP only provides an ipv6 prefix, but not an address to the WAN interface, the rc.newwanipv6 script exits early and does nothing. The main issue I'm having with this is that radvd is not reconfigured to advertise on the LAN, so clients do not get ipv6 addresses. If dhcp6 is enabled on LAN, it is also not reconfigured. Manually restarting radvd in the GUI fixes the issue and it begins advertising on the LAN.
The WAN ipv6 check in rc.newwanipv6 is here:
core/src/etc/rc.newwanipv6
Lines 81 to 84 in 0ab7a96
Inside
interfaces_primary_address6
there is a call tointerfaces_has_prefix_only
and if it returns true, the link-local ipv6 address is returned. Otherwise the function looks for a non-link local ipv6 address on the interface.core/src/etc/inc/interfaces.inc
Line 4192 in 0ab7a96
The problem is that the
interfaces_has_prefix_only
function only looks at the config. As far as I can tell it doesn't actually determine whether the ISP only assigned a prefix. In particular it looks for adhcp6prefixonly
tag in thedhcp6
section of the interface's config in/conf/config.xml
.core/src/etc/inc/interfaces.inc
Line 4106 in 0ab7a96
That tag is only present if the user checks the "Request only an IPv6 prefix" option in the interface configuration page of the GUI.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expected the "Request only an IPv6 prefix" to only affect the solicitations opnsense sends to the ISP. I didn't expect it to be necessary to set this option for ipv6 to work correctly if the ISP only provides a prefix and no GUA wan ipv6.
Relevant log files
I have previously shared some logs in this thread on the forum.
Here's an excerpt where you can see that rc.newwanipv6 fails after dhcp6c_script sends a renewal request on the WAN interface (vtnet1 here). This is with the "Request only an IPv6 prefix" option unchecked.
Environment
OPNsense 24.1_1 (amd64).
Running in a VM with VirtIO network interfaces
The ISP is Verizon Fios
The text was updated successfully, but these errors were encountered: