From 7684c18604b68f4d3af3edf7d19fe4d5bae1db86 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 21 Mar 2021 00:36:24 +0100 Subject: [PATCH] luci-mod-network: restore DNS option semantics for proto static 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 (cherry picked from commit 2bfd4908a9cfeac74c7abc31d8cef0bf1e58af52) --- .../htdocs/luci-static/resources/view/network/interfaces.js | 2 ++ 1 file changed, 2 insertions(+) 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 7b3f93d50a..3ea7788af1 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 @@ -680,9 +680,11 @@ return view.extend({ 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';