luci-mod-network: fix legacy bridge configuration
authorJo-Philipp Wich <jo@mein.io>
Sat, 20 Mar 2021 23:18:20 +0000 (00:18 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Thu, 27 May 2021 10:19:05 +0000 (12:19 +0200)
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>
(cherry picked from commit edf640af583de122b020d215aadd141028c9458f)

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;
 }