]]--
local sys = require "luci.sys"
+local utl = require "luci.util"
local dsp = require "luci.dispatcher"
local nxo = require "nixio"
local n = s.network or s.name
if n then
local i
- for i in n:gmatch("%S+") do
+ for i in utl.imatch(n) do
if i == "wan" then
wan_zone = s.name
return false
o.template = "cbi/firewall_zonelist"
- o = s:option(DynamicList, "src_mac", translate("Source MAC address"))
- o.rmempty = true
- o.datatype = "neg(macaddr)"
- o.placeholder = translate("any")
-
- luci.sys.net.mac_hints(function(mac, name)
- o:value(mac, "%s (%s)" %{ mac, name })
- end)
-
-
o = s:option(Value, "src_ip", translate("Source IP address"))
o.rmempty = true
o.datatype = "neg(ipaddr)"
o.rmempty = true
o.placeholder = translate("any")
- o.datatype = "portrange"
+ o.datatype = "neg(portrange)"
o = s:option(Value, "src_dip",