summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-firewall/htdocs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-01-04 18:46:04 +0100
committerJo-Philipp Wich <jo@mein.io>2020-01-04 18:48:49 +0100
commitd60a1a13b091c622bc2d4d63321d2e3ea0437796 (patch)
treea1b06e9065331a13501f6153724861f3875548ae /applications/luci-app-firewall/htdocs
parent4c4d6e2bb2297a56ad1cad37d5b82a3b6e10211b (diff)
luci-app-firewall: fix zone network default
When a `config zone` section lacks an `option network` or `list network` setting, its contained interface list defaults to the name of the zone, e.g. a zone named `foo` will implicitely contain the network `foo` unless a deviating or empty `option network` is specified. Adjust the zones.js model accordingly to reflect that implicit default. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-firewall/htdocs')
-rw-r--r--applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js
index 8bf8d04861..4f8dad23d3 100644
--- a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js
+++ b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js
@@ -137,6 +137,9 @@ return L.view.extend({
o = s.taboption('general', widgets.NetworkSelect, 'network', _('Covered networks'));
o.modalonly = true;
o.multiple = true;
+ o.cfgvalue = function(section_id) {
+ return uci.get('firewall', section_id, 'network') || uci.get('firewall', section_id, 'name');
+ };
o.write = function(section_id, formvalue) {
var name = uci.get('firewall', section_id, 'name'),
cfgvalue = this.cfgvalue(section_id);