From: yangfl Date: Wed, 10 Oct 2018 05:12:34 +0000 (+0800) Subject: luci-mod-network: show bridges in ifacelist when the interface itself is not a bridge X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=645a555f391044504886d6fcb5d6235911eb6869;p=project%2Fluci.git luci-mod-network: show bridges in ifacelist when the interface itself is not a bridge It's completely OK to select a bridge as the underlying interface of other interfaces, say a tunnel or PPPoE. The only case which should be forbidden is bridge over bridge. Signed-off-by: David Yang --- diff --git a/modules/luci-mod-network/luasrc/model/cbi/admin_network/ifaces.lua b/modules/luci-mod-network/luasrc/model/cbi/admin_network/ifaces.lua index 8be354b448..bff859befa 100644 --- a/modules/luci-mod-network/luasrc/model/cbi/admin_network/ifaces.lua +++ b/modules/luci-mod-network/luasrc/model/cbi/admin_network/ifaces.lua @@ -284,7 +284,7 @@ if not net:is_floating() then ifname_single = s:taboption("physical", Value, "ifname_single", translate("Interface")) ifname_single.template = "cbi/network_ifacelist" ifname_single.widget = "radio" - ifname_single.nobridges = true + ifname_single.nobridges = net:is_bridge() ifname_single.noaliases = false ifname_single.rmempty = false ifname_single.network = arg[1] @@ -341,7 +341,7 @@ end if not net:is_virtual() then ifname_multi = s:taboption("physical", Value, "ifname_multi", translate("Interface")) ifname_multi.template = "cbi/network_ifacelist" - ifname_multi.nobridges = true + ifname_multi.nobridges = net:is_bridge() ifname_multi.noaliases = true ifname_multi.rmempty = false ifname_multi.network = arg[1]