diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2021-05-17 14:01:24 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2021-05-18 20:09:47 +0200 |
commit | a90115cd82372eaaa0ed531800b568387e200c97 (patch) | |
tree | 5cd595be9b00272e3840ad27f21dfd5a0e050539 /modules/luci-mod-network/htdocs/luci-static/resources/tools | |
parent | ec020cee0c44793f8ce1b346675c6a36e63b0154 (diff) |
luci-mod-network: use "ports" option for setting bridge ports
netifd has been recently patched to use more accurate "ports" option
instead of "ifname"
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'modules/luci-mod-network/htdocs/luci-static/resources/tools')
-rw-r--r-- | modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js index b4d941c60d..12ed08ad17 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js @@ -499,7 +499,7 @@ return baseclass.extend({ o.multiple = true; o.noaliases = true; o.nobridges = true; - o.ucioption = 'ifname'; + o.ucioption = 'ports'; o.write = o.remove = setIfActive; o.default = L.toArray(dev ? dev.getPorts() : null).filter(function(p) { return p.getType() != 'wifi' }).map(function(p) { return p.getName() }); o.filter = function(section_id, device_name) { @@ -509,7 +509,7 @@ return baseclass.extend({ /* only show wifi networks which are already present in "option ifname" */ if (choice_dev.getType() == 'wifi') { - var ifnames = L.toArray(uci.get('network', section_id, 'ifname')); + var ifnames = L.toArray(uci.get('network', section_id, 'ports')); for (var i = 0; i < ifnames.length; i++) if (ifnames[i] == device_name) @@ -918,8 +918,8 @@ return baseclass.extend({ var seen_ports = {}; - L.toArray(uci.get('network', s.section, 'ifname')).forEach(function(ifname) { - seen_ports[ifname] = true; + L.toArray(uci.get('network', s.section, 'ports')).forEach(function(port) { + seen_ports[port] = true; }); uci.sections('network', 'bridge-vlan', function(bvs) { |