summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-firewall/luasrc/model
diff options
context:
space:
mode:
authorManuel Munz <freifunk@somakoma.de>2011-04-13 00:33:42 +0000
committerManuel Munz <freifunk@somakoma.de>2011-04-13 00:33:42 +0000
commitbb2d7517eb3d2229331e11aab5c6c900259e0742 (patch)
tree72625b858eb52433a3b87000b895ef872510dbe1 /applications/luci-firewall/luasrc/model
parent5a1e9354b41155b9604362c9a1ef8d7a899ba2b2 (diff)
luci-firewall: Add support for negations for ip addresses/nets (#218)
Diffstat (limited to 'applications/luci-firewall/luasrc/model')
-rw-r--r--applications/luci-firewall/luasrc/model/cbi/luci_fw/rrule.lua2
-rw-r--r--applications/luci-firewall/luasrc/model/cbi/luci_fw/trule.lua4
-rw-r--r--applications/luci-firewall/luasrc/model/cbi/luci_fw/zone.lua4
3 files changed, 5 insertions, 5 deletions
diff --git a/applications/luci-firewall/luasrc/model/cbi/luci_fw/rrule.lua b/applications/luci-firewall/luasrc/model/cbi/luci_fw/rrule.lua
index 74617e08b7..ddecad33ed 100644
--- a/applications/luci-firewall/luasrc/model/cbi/luci_fw/rrule.lua
+++ b/applications/luci-firewall/luasrc/model/cbi/luci_fw/rrule.lua
@@ -121,7 +121,7 @@ src_mac.placeholder = translate("any")
src_ip = s:taboption("advanced", Value, "src_ip", translate("Source IP address"))
src_ip.optional = true
-src_ip.datatype = "ip4addr"
+src_ip.datatype = "neg_ip4addr"
src_ip.placeholder = translate("any")
sport = s:taboption("advanced", Value, "src_port", translate("Source port"),
diff --git a/applications/luci-firewall/luasrc/model/cbi/luci_fw/trule.lua b/applications/luci-firewall/luasrc/model/cbi/luci_fw/trule.lua
index 5b6207192f..10a9869490 100644
--- a/applications/luci-firewall/luasrc/model/cbi/luci_fw/trule.lua
+++ b/applications/luci-firewall/luasrc/model/cbi/luci_fw/trule.lua
@@ -106,7 +106,7 @@ icmpt:value("address-mask-reply")
src_ip = s:taboption("general", Value, "src_ip", translate("Source address"))
src_ip.optional = true
-src_ip.datatype = has_v2 and "ipaddr" or "ip4addr"
+src_ip.datatype = has_v2 and "neg_ipaddr" or "neg_ip4addr"
src_ip.placeholder = translate("any")
sport = s:taboption("general", Value, "src_port", translate("Source port"))
@@ -119,7 +119,7 @@ sport:depends("proto", "tcpudp")
dest_ip = s:taboption("general", Value, "dest_ip", translate("Destination address"))
dest_ip.optional = true
-dest_ip.datatype = has_v2 and "ipaddr" or "ip4addr"
+dest_ip.datatype = has_v2 and "neg_ipaddr" or "neg_ip4addr"
dest_ip.placeholder = translate("any")
dport = s:taboption("general", Value, "dest_port", translate("Destination port"))
diff --git a/applications/luci-firewall/luasrc/model/cbi/luci_fw/zone.lua b/applications/luci-firewall/luasrc/model/cbi/luci_fw/zone.lua
index 00695a79c2..30fcd476bd 100644
--- a/applications/luci-firewall/luasrc/model/cbi/luci_fw/zone.lua
+++ b/applications/luci-firewall/luasrc/model/cbi/luci_fw/zone.lua
@@ -129,7 +129,7 @@ msrc = s:taboption("advanced", DynamicList, "masq_src",
translate("Restrict Masquerading to given source subnets"))
msrc.optional = true
-msrc.datatype = "ip4addr"
+msrc.datatype = "neg_ip4addr"
msrc.placeholder = "0.0.0.0/0"
msrc:depends("family", "")
msrc:depends("family", "ipv4")
@@ -138,7 +138,7 @@ mdest = s:taboption("advanced", DynamicList, "masq_dest",
translate("Restrict Masquerading to given destination subnets"))
mdest.optional = true
-mdest.datatype = "ip4addr"
+mdest.datatype = "neg_ip4addr"
mdest.placeholder = "0.0.0.0/0"
mdest:depends("family", "")
mdest:depends("family", "ipv4")