Repository navigation
Pins the hotspot's IPv6 subnet in managed mode, so it doesn't move when another interface gets added to OpenWrt. - #6
Merged
Conversation
netifd hands out the ULA's /64s in interface-name order and redoes them whenever an interface is added, so a LAN that sorts before vaplan (the image's own Containers does) moves every hotspot client to a new subnet. Set ip6hint from the gateway's third octet, so 192.168.42.1 always gets <ula>:42::/64. A hint set by hand is kept.
Contributor
Author
|
I thought it would be a good idea to contribute a bit since you are very busy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
provision_openwrt()only setsip6assign 64onvaplan, so netifd decides which /64 of the ULA it gets. netifd hands them out in interface-name order and redoes all of them whenever an interface is added, so anything that sorts beforevaplanpushes it to a new subnet. The image's ownContainersinterface already does this: after reinstalling on the newer image,vaplanwent from<ula>::/64to<ula>:1::/64for me. Adding something like alanorguestinterface in LuCI moves it again.SLAAC clients follow along fine, but anything static breaks without any error. I'm routing IPv6 to a wired LAN behind a laptop on the hotspot, and both the laptop's static address and the
route6on OpenWrt point intovaplan's subnet.Fix
Set
network.vaplan.ip6hintfrom the gateway's third octet, so192.168.42.1always gets<ula>:42::/64. It's only set when there's no hint yet, so one set by hand is kept. If the prefix is too small for the hint, netifd just picks one itself like before.Existing installs move to
:42once, on the first start after this. SLAAC clients renumber on their own.Tested on a Samsung Galaxy A15 4G (SM-A155F, MT6789)