aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/config/firewall
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2014-02-21 00:22:23 +0000
committerJo-Philipp Wich <jow@openwrt.org>2014-02-21 00:22:23 +0000
commit13ede72907733afaae1363190c36614e7be6aaf8 (patch)
tree93b586aa7cd17c170dc8872e63657a12cc5100cf /package/network/config/firewall
parent0d02f32a1762a9dd4a6c17f7979fd9985cb13590 (diff)
downloadmaster-187ad058-13ede72907733afaae1363190c36614e7be6aaf8.tar.gz
master-187ad058-13ede72907733afaae1363190c36614e7be6aaf8.tar.bz2
master-187ad058-13ede72907733afaae1363190c36614e7be6aaf8.zip
firewall: fix validation constraints
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39649 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/config/firewall')
-rwxr-xr-xpackage/network/config/firewall/files/firewall.init16
1 files changed, 8 insertions, 8 deletions
diff --git a/package/network/config/firewall/files/firewall.init b/package/network/config/firewall/files/firewall.init
index 8abbf68254..1147b83335 100755
--- a/package/network/config/firewall/files/firewall.init
+++ b/package/network/config/firewall/files/firewall.init
@@ -7,13 +7,13 @@ QUIET=""
validate_firewall_redirect()
{
uci_validate_section firewall redirect "${1}" \
- 'proto:or("tcp", "udp", "tcpudp")' \
+ 'proto:or(uinteger, string)' \
'src:string' \
- 'src_ip:ipaddr' \
- 'src_dport:string' \
+ 'src_ip:cidr' \
+ 'src_dport:or(port, portrange)' \
'dest:string' \
- 'dest_ip:ipaddr' \
- 'dest_port:string' \
+ 'dest_ip:cidr' \
+ 'dest_port:or(port, portrange)' \
'target:or("SNAT", "DNAT")'
return $?
@@ -22,11 +22,11 @@ validate_firewall_redirect()
validate_firewall_rule()
{
uci_validate_section firewall rule "${1}" \
- 'proto:string' \
+ 'proto:or(uinteger, string)' \
'src:string' \
'dest:string' \
- 'src_port:string' \
- 'dest_port:string' \
+ 'src_port:or(port, portrange)' \
+ 'dest_port:or(port, portrange)' \
'target:string'
return $?