From: David Härdeman Date: Sun, 30 Nov 2025 15:47:48 +0000 (+0100) Subject: luci-mod-network: add IPv6-only preferred option X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=61e81c1b53a2f92086879752430ffc787659a879;p=openwrt-luci.git luci-mod-network: add IPv6-only preferred option This adds support for the IPv6-only preferred (RFC8925) option to LuCI. The option is supported by odhcpd since commit 338ca8abb950e4e0448a13d50d6d6567a167d016 Signed-off-by: David Härdeman --- diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js index 44fc0df706..e9fe9d74d1 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js @@ -746,6 +746,13 @@ return view.extend({ _('Do not provide DHCPv4 services on this interface.')); so.value('server', _('enabled'), _('Provide DHCPv4 services on this interface.')); + + so = ss.taboption('ipv4', form.Value, 'ipv6_only_preferred', _('IPv6-Only Preferred'), + _('Specifies how often (in seconds) clients should check whether IPv6-only mode is still preferred (see %s, odhcpd only).') + .format('RFC8925').format('https://www.rfc-editor.org/rfc/rfc8925')); + so.optional = true; + so.datatype = 'or(0, range(300,86400))'; + so.default = '0'; } so = ss.taboption('ipv4', form.Value, 'start', _('Start', 'DHCP IP range start address'), _('Lowest leased address as offset from the network address.'));