m = Map("network", translate("interfaces"), translate("a_n_ifaces1"))
m:chain("firewall")
+m:chain("wireless")
nw.init(m.uci)
fw.init(m.uci)
if has_ipv6 then s:tab("ipv6", translate("a_n_ipv6", "IPv6 Setup")) end
if has_pppd then s:tab("ppp", translate("a_n_ppp", "PPP Settings")) end
s:tab("physical", translate("a_n_physical", "Physical Settings"))
+s:tab("firewall", translate("a_n_firewall", "Firewall Settings"))
--[[
back = s:taboption("general", DummyValue, "_overview", translate("overview"))
ifname_single.template = "cbi/network_ifacelist"
ifname_single.widget = "radio"
ifname_single.nobridges = true
+ifname_single.network = arg[1]
ifname_single.rmempty = true
ifname_single:depends("type", "")
function ifname_single.write(self, s, val)
local n = nw:get_network(s)
- if n then n:ifname(val) end
+ if n then
+ local i
+ for _, i in ipairs(n:get_interfaces()) do
+ n:del_interface(i)
+ end
+ n:add_interface(val)
+ end
end
ifname_multi = s:taboption("physical", MultiValue, "ifname_multi", translate("interface"))
ifname_multi.template = "cbi/network_ifacelist"
ifname_multi.nobridges = true
+ifname_multi.network = arg[1]
ifname_multi.widget = "checkbox"
ifname_multi:depends("type", "1")
ifname_multi.cfgvalue = ifname_single.cfgvalue
ifname_multi.write = ifname_single.write
+
for _, d in ipairs(nw:get_interfaces()) do
if not d:is_bridge() then
ifname_single:value(d:name())
end
-fwzone = s:taboption("general", Value, "_fwzone",
+local fwd_to, fwd_from
+
+fwzone = s:taboption("firewall", Value, "_fwzone",
translate("network_interface_fwzone"),
translate("network_interface_fwzone_desc"))
fwzone.template = "cbi/firewall_zonelist"
+fwzone.network = arg[1]
fwzone.rmempty = false
function fwzone.cfgvalue(self, section)
end
end
+
ipaddr = s:taboption("general", Value, "ipaddr", translate("ipaddress"))
ipaddr.rmempty = true
ipaddr:depends("proto", "static")