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