- if value == "1" then
- net = nw:get_network(addnet:formvalue(section))
- if net then
- net:type("bridge")
- end
- else
- local zval = fwzone:formvalue(section)
-
- net = nw:add_network(newnet:formvalue(section), { proto = "none" })
- zone = fw:get_zone(zval)
-
- if not zone and zval == '-' then
- zval = m:formvalue(fwzone:cbid(section) .. ".newzone")
- if zval and #zval > 0 then
- zone = fw:add_zone(zval)
- else
- fw:del_network(arg[1])
- end
+mifname = m:field(Value, "_ifnames", translate("Cover the following interfaces"),
+ translate("Note: If you choose an interface here which is part of another network, it will be moved into this network."))
+
+mifname.widget = "checkbox"
+mifname.template = "cbi/network_ifacelist"
+mifname.nobridges = true
+
+
+local _, p
+for _, p in ipairs(nw:get_protocols()) do
+ if p:is_installed() then
+ newproto:value(p:proto(), p:get_i18n())
+ if not p:is_virtual() then netbridge:depends("_netproto", p:proto()) end
+ if not p:is_floating() then
+ sifname:depends({ _bridge = "", _netproto = p:proto()})
+ mifname:depends({ _bridge = "1", _netproto = p:proto()})