m.title = "%s - %s" %{ translate("Firewall - Port Forwards"), name }
end
-local wan_zone = nil
-
-m.uci:foreach("firewall", "zone",
- function(s)
- local n = s.network or s.name
- if n then
- local i
- for i in n:gmatch("%S+") do
- if i == "wan" then
- wan_zone = s.name
- return false
- end
- end
- end
- end)
-
s = m:section(NamedSection, arg[1], "redirect", "")
s.anonymous = true
s.addremove = false
o = s:option(Flag, "reflection", translate("Enable NAT Loopback"))
o.rmempty = true
o.default = o.enabled
-o:depends("src", wan_zone)
o.cfgvalue = function(...)
return Flag.cfgvalue(...) or "1"
end