luci-mod-network: only consider bridge vlans belonging to the current device
authorJo-Philipp Wich <jo@mein.io>
Thu, 17 Jun 2021 06:58:15 +0000 (08:58 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 17 Jun 2021 07:22:16 +0000 (09:22 +0200)
In case multiple bridges with bridge vlans are declared, LuCI did not
correctly filter the VLANs to show only the ones belonging to the
bridge being configured currently.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js

index 2ebf3afe029a4328e4a8a883a75db5b7eda42087..ce6388b6cd79f5026a57e473490036ed8e11bae7 100644 (file)
@@ -968,6 +968,9 @@ return baseclass.extend({
                });
 
                uci.sections('network', 'bridge-vlan', function(bvs) {
+                       if (uci.get('network', s.section, 'name') != bvs.device)
+                               return;
+
                        L.toArray(bvs.ports).forEach(function(portspec) {
                                var m = portspec.match(/^([^:]+)(?::[ut*]+)?$/);