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>
(cherry picked from commit
d60a1a13b091c622bc2d4d63321d2e3ea0437796)
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);