Skip to content

Pins the hotspot's IPv6 subnet in managed mode, so it doesn't move when another interface gets added to OpenWrt. - #6

Merged
ravindu644 merged 1 commit into
ravindu644:mainfrom
poqdavid:backend-pin-vaplan-ip6hint
Oct 15, 2026
Merged

ravindu644 merged 1 commit into
ravindu644:mainfrom
poqdavid:backend-pin-vaplan-ip6hint

Conversation

@poqdavid

Copy link
Copy Markdown
Contributor

Problem

provision_openwrt() only sets ip6assign 64 on vaplan, 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 before vaplan pushes it to a new subnet. The image's own Containers interface already does this: after reinstalling on the newer image, vaplan went from <ula>::/64 to <ula>:1::/64 for me. Adding something like a lan or guest interface 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 route6 on OpenWrt point into vaplan's subnet.

Fix

Set network.vaplan.ip6hint from the gateway's third octet, so 192.168.42.1 always 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 :42 once, on the first start after this. SLAAC clients renumber on their own.

Tested on a Samsung Galaxy A15 4G (SM-A155F, MT6789)

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.
@poqdavid

poqdavid commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

I thought it would be a good idea to contribute a bit since you are very busy.
Please let me know if I'm off base or if this doesn't make sense.

@ravindu644
ravindu644 merged commit 32efe32 into ravindu644:main Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants