applications/luci-firewall: allow negations in all applicable fields (#468)

This commit is contained in:
Jo-Philipp Wich 2012-08-09 10:03:32 +00:00
parent 2026f53881
commit a2e93572a9
2 changed files with 5 additions and 5 deletions

View file

@ -88,7 +88,7 @@ o = s:option(DynamicList, "src_mac",
translate("Source MAC address"), translate("Source MAC address"),
translate("Only match incoming traffic from these MACs.")) translate("Only match incoming traffic from these MACs."))
o.rmempty = true o.rmempty = true
o.datatype = "macaddr" o.datatype = "neg(macaddr)"
o.placeholder = translate("any") o.placeholder = translate("any")
luci.sys.net.mac_hints(function(mac, name) luci.sys.net.mac_hints(function(mac, name)
@ -112,7 +112,7 @@ o = s:option(Value, "src_port",
translate("Source port"), translate("Source port"),
translate("Only match incoming traffic originating from the given source port or port range on the client host")) translate("Only match incoming traffic originating from the given source port or port range on the client host"))
o.rmempty = true o.rmempty = true
o.datatype = "portrange" o.datatype = "neg(portrange)"
o.placeholder = translate("any") o.placeholder = translate("any")
@ -126,14 +126,14 @@ end)
o.rmempty = true o.rmempty = true
o.datatype = "ip4addr" o.datatype = "neg(ip4addr)"
o.placeholder = translate("any") o.placeholder = translate("any")
o = s:option(Value, "src_dport", translate("External port"), o = s:option(Value, "src_dport", translate("External port"),
translate("Match incoming traffic directed at the given " .. translate("Match incoming traffic directed at the given " ..
"destination port or port range on this host")) "destination port or port range on this host"))
o.datatype = "portrange" o.datatype = "neg(portrange)"

View file

@ -156,7 +156,7 @@ elseif rule_type == "redirect" then
o.rmempty = true o.rmempty = true
o.placeholder = translate("any") o.placeholder = translate("any")
o.datatype = "portrange" o.datatype = "neg(portrange)"
o = s:option(Value, "src_dip", o = s:option(Value, "src_dip",