The peerdns settings makes little practical sense for proto:static
interfaces, so revert to allow setting the DNS server list directly.
Fixes: faad7464a8 ("luci-mod-network: add support for network.device sections")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
o.default = o.enabled;
o = nettools.replaceOption(s, 'advanced', form.Flag, 'peerdns', _('Use DNS servers advertised by peer'), _('If unchecked, the advertised DNS server addresses are ignored'));
+ o.depends({ 'proto': 'static', '!reverse': true });
o.default = o.enabled;
o = nettools.replaceOption(s, 'advanced', form.DynamicList, 'dns', _('Use custom DNS servers'));
+ o.depends('proto', 'static');
o.depends('peerdns', '0');
o.datatype = 'ipaddr';