From: Paul Donald Date: Mon, 27 Oct 2025 17:18:58 +0000 (+0100) Subject: luci-mod-network: Allow the 'dns' entry under the DHCP tab to take IPv4+6 X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=a010a1bfcd0126194f8516f8662b3584f236b866;p=openwrt-luci.git luci-mod-network: Allow the 'dns' entry under the DHCP tab to take IPv4+6 This option is used by odhcpd. It can take IPv4/6 entries, although IPv4 DNS servers don't always make sense in an IPv6 environment, they might in a dual stack environment. Entering an IPv4 here results in its distribution via IPv6. This option becomes more useful for both families when odhcpd handles IPv4+6. Signed-off-by: Paul Donald --- 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 a949ccb7b3..6db2df8a05 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 @@ -1009,9 +1009,12 @@ return view.extend({ so.datatype = 'range(1,62)'; so.depends('dhcpv6', 'server'); - so = ss.taboption('ipv6', form.DynamicList, 'dns', _('Announce IPv6 DNS servers'), - _('Specifies a fixed list of IPv6 DNS server addresses to announce via DHCPv6. If left unspecified, the device will announce itself as IPv6 DNS server unless the Local IPv6 DNS server option is disabled.')); - so.datatype = 'ip6addr("nomask")'; /* restrict to IPv6 only for now since dnsmasq (DHCPv4) does not honour this option */ + /* This option is used by odhcpd. It can take IPv4/6 entries, although IPv4 DNS servers don't + always make sense in an IPv6 environment, they might in a dual stack environment. */ + so = ss.taboption('ipv6', form.DynamicList, 'dns', _('Announce IPv4/6 DNS servers'), + _('Specifies a fixed list of DNS server addresses to announce via DHCPv6.') + '
' + + _('If left unspecified, the device will announce itself as DNS server unless the Local IPv6 DNS server option is disabled.')); + so.datatype = 'ipaddr("nomask")'; so.depends('ra', 'server'); so.depends({ ra: 'hybrid', master: '0' }); so.depends('dhcpv6', 'server');