Repository navigation
luci-mod-network: honor the DHCPv6-PD default - #9211
Conversation
odhcpd enables prefix delegation when dhcpv6_pd is absent, while the LuCI flag defaults to disabled. Unchecking it removes the option and therefore leaves delegation enabled. Use the backend default for the flag and preserve an explicit setting when the DHCPv6 mode changes and the control is hidden. Signed-off-by: Lucas Albers <lucas.b.albers@gmail.com>
|
I tried to test this. |
|
I retested this on OpenWrt 25.12.6 with Playwright. Stock LuCI (flag default disabled) does what you saw: unchecking an explicit With this PR's Please hard-refresh after replacing |
|
Thank you, retest works as describe. |
Nah, |
|
Thank you @Alphix for your feedback. |
Also show the prefix-delegation flag and minimum length when DHCPv6 is in hybrid mode on a non-master interface, matching the other DHCPv6 options. Signed-off-by: Lucas Albers <lucas.b.albers@gmail.com>
|
@jow- This is ready when you have a moment: two approvals (including the odhcpd/LuCI default review) and CI is green. Small luci-mod-network change to match the default DHCPv6-PD option. |
Description
odhcpd enables DHCPv6 prefix delegation when
dhcpv6_pdis absent, but LuCI treats the unchecked state as the default. Unchecking DHCPv6-PD therefore removes the option and leaves prefix delegation enabled.Set the flag's default to enabled so the UI reflects odhcpd and disabling it writes
0. Retain an explicit value when a DHCPv6 mode change hides the control, so changing modes does not discard the disabled setting.Refs #8982
Tested on
OpenWrt 25.12.5 x86-64 (
r33051-f5dae5ece4) rootfs containers; Chrome with Playwright. Reproduced deletion ofdhcpv6_pdwhen unchecking the original flag. With the modified view, checked initial absent,1, and0states; verified that disabling stages0, re-enabling stages removal, and Save & Apply writes0. Confirmed a fresh container with committed0renders unchecked. Switching server to relay with a committed0retained the setting; that mode-selector check used programmatic DOM clicks because the modal intercepted pointer events.Separately, on an isolated Docker IPv6 network with OpenWrt 25.12.5
odhcpdand a downstreamodhcp6cclient, a fresh IA_PD request received a /62 with the option absent, received no delegated prefix with0, and received a /62 again with1. These backend settings were changed directly through UCI; the UI and client exchange were not tested as one continuous run. No physical router was tested.