luci-mod-network: allow IPv6 dns, dns_service and domain for RA only mode
authorJo-Philipp Wich <jo@mein.io>
Wed, 1 Dec 2021 22:18:35 +0000 (23:18 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 1 Dec 2021 22:20:06 +0000 (23:20 +0100)
Fixes: #5564
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js

index 4d42fdd5146ef50dd97f9c0a6beee3365023df58..a26d51bc5ed41a4bf828999a34340a18332db578 100644 (file)
@@ -882,18 +882,24 @@ return view.extend({
                                        so = ss.taboption('ipv6', form.DynamicList, 'dns', _('Announced 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 <em>Local IPv6 DNS server</em> option is disabled.'));
                                        so.datatype = 'ip6addr("nomask")'; /* restrict to IPv6 only for now since dnsmasq (DHCPv4) does not honour this option */
+                                       so.depends('ra', 'server');
+                                       so.depends({ ra: 'hybrid', master: '0' });
                                        so.depends('dhcpv6', 'server');
                                        so.depends({ dhcpv6: 'hybrid', master: '0' });
 
                                        so = ss.taboption('ipv6', form.Flag, 'dns_service', _('Local IPv6 DNS server'),
                                                _('Announce this device as IPv6 DNS server.'));
                                        so.default = so.enabled;
+                                       so.depends({ ra: 'server', dns: /^$/ });
+                                       so.depends({ ra: 'hybrid', dns: /^$/, master: '0' });
                                        so.depends({ dhcpv6: 'server', dns: /^$/ });
                                        so.depends({ dhcpv6: 'hybrid', dns: /^$/, master: '0' });
 
                                        so = ss.taboption('ipv6', form.DynamicList, 'domain', _('Announced DNS domains'),
                                                _('Specifies a fixed list of DNS search domains to announce via DHCPv6. If left unspecified, the local device DNS search domain will be announced.'));
                                        so.datatype = 'hostname';
+                                       so.depends('ra', 'server');
+                                       so.depends({ ra: 'hybrid', master: '0' });
                                        so.depends('dhcpv6', 'server');
                                        so.depends({ dhcpv6: 'hybrid', master: '0' });