diff options
author | Steven Barth <steven@midlink.org> | 2008-09-02 11:27:00 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-09-02 11:27:00 +0000 |
commit | f9a3de2234bb88afd428edd5080c227411392ac4 (patch) | |
tree | b8658dd9f46602c5bb54f9f3efa9403e5922ca9c /applications | |
parent | 954e61d2a3be5cf919908f8989e5d9c7f3b7884a (diff) |
applications/luci-fw: Fixed r2979, closes #112
Diffstat (limited to 'applications')
4 files changed, 8 insertions, 1 deletions
diff --git a/applications/luci-fw/luasrc/model/cbi/luci_fw/customfwd.lua b/applications/luci-fw/luasrc/model/cbi/luci_fw/customfwd.lua index 42be400c4..b883c4750 100644 --- a/applications/luci-fw/luasrc/model/cbi/luci_fw/customfwd.lua +++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/customfwd.lua @@ -25,7 +25,7 @@ name.size = 10 iface = s:option(ListValue, "src", translate("fw_zone")) iface.default = "wan" -luci.model.uci.foreach("firewall", "zone", +luci.model.uci.cursor():foreach("firewall", "zone", function (section) iface:value(section.name) end) @@ -37,18 +37,21 @@ sport = s:option(Value, "src_port") sport.optional = true sport:depends("proto", "tcp") sport:depends("proto", "udp") +sport:depends("proto", "tcpudp") proto = s:option(ListValue, "proto", translate("protocol")) proto.optional = true proto:value("") proto:value("tcp", "TCP") proto:value("udp", "UDP") +proto:value("tcpudp", "TCP+UDP") dport = s:option(Value, "src_dport") dport.size = 5 dport.optional = true dport:depends("proto", "tcp") dport:depends("proto", "udp") +dport:depends("proto", "tcpudp") to = s:option(Value, "dest_ip") for i, dataset in ipairs(luci.sys.net.arptable()) do diff --git a/applications/luci-fw/luasrc/model/cbi/luci_fw/firewall.lua b/applications/luci-fw/luasrc/model/cbi/luci_fw/firewall.lua index 3d0cd9e5b..8ff03b02d 100644 --- a/applications/luci-fw/luasrc/model/cbi/luci_fw/firewall.lua +++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/firewall.lua @@ -46,11 +46,13 @@ sport = s:option(Value, "src_port") sport.optional = true sport:depends("proto", "tcp") sport:depends("proto", "udp") +sport:depends("proto", "tcpudp") dport = s:option(Value, "dest_port") dport.optional = true dport:depends("proto", "tcp") dport:depends("proto", "udp") +dport:depends("proto", "tcpudp") jump = s:option(ListValue, "target") jump.rmempty = true diff --git a/applications/luci-fw/luasrc/model/cbi/luci_fw/miniportfw.lua b/applications/luci-fw/luasrc/model/cbi/luci_fw/miniportfw.lua index 09806e67a..b192b610c 100644 --- a/applications/luci-fw/luasrc/model/cbi/luci_fw/miniportfw.lua +++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/miniportfw.lua @@ -29,6 +29,7 @@ name.size = 10 proto = s:option(ListValue, "proto", translate("protocol")) proto:value("tcp", "TCP") proto:value("udp", "UDP") +proto:value("tcpudp", "TCP+UDP") dport = s:option(Value, "src_dport") dport.size = 5 diff --git a/applications/luci-fw/luasrc/model/cbi/luci_fw/portfw.lua b/applications/luci-fw/luasrc/model/cbi/luci_fw/portfw.lua index 314dd418e..9afd4f3e5 100644 --- a/applications/luci-fw/luasrc/model/cbi/luci_fw/portfw.lua +++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/portfw.lua @@ -33,6 +33,7 @@ luci.model.uci.cursor():foreach("firewall", "zone", proto = s:option(ListValue, "proto", translate("protocol")) proto:value("tcp", "TCP") proto:value("udp", "UDP") +proto:value("tcpudp", "TCP+UDP") dport = s:option(Value, "src_dport") dport.size = 5 |