luci-mod-network: fix legacy bridge configuration
authorJo-Philipp Wich <jo@mein.io>
Sat, 20 Mar 2021 23:18:20 +0000 (00:18 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sat, 20 Mar 2021 23:19:55 +0000 (00:19 +0100)
Ref: https://github.com/openwrt/luci/pull/4307#issuecomment-803432603
Fixes: faad7464a8 ("luci-mod-network: add support for network.device sections")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js

index 2ca28ee9506587b1a70b0e39af6652e5b59fb219..66d4eae9e2faa106c1c532e54aacda34612d0299 100644 (file)
@@ -53,16 +53,6 @@ function deviceSectionExists(section_id, devname) {
                exists = exists || (ss['.name'] != section_id && ss.name == devname /* && !ss.type*/);
        });
 
-       /* Until http://lists.openwrt.org/pipermail/openwrt-devel/2020-July/030397.html lands,
-          prevent redeclaring interface bridges */
-       if (!exists) {
-               var m = devname.match(/^br-([A-Za-z0-9_]+)$/),
-                   s = m ? uci.get('network', m[1]) : null;
-
-               if (s && s['.type'] == 'interface' && s.type == 'bridge')
-                       exists = true;
-       }
-
        return exists;
 }