From: Jo-Philipp Wich Date: Fri, 21 Feb 2014 00:22:23 +0000 (+0000) Subject: firewall: fix validation constraints X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6fe9e7b66d83b27e1efd8b0f582e972ca7895af9;p=openwrt%2Fsvn-archive%2Farchive.git firewall: fix validation constraints Signed-off-by: Jo-Philipp Wich SVN-Revision: 39649 --- 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 $?