mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 23:42:43 +00:00
firewall: fix validation constraints
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 39649
This commit is contained in:
parent
354efde275
commit
b22ad85bc6
@ -7,13 +7,13 @@ QUIET=""
|
|||||||
validate_firewall_redirect()
|
validate_firewall_redirect()
|
||||||
{
|
{
|
||||||
uci_validate_section firewall redirect "${1}" \
|
uci_validate_section firewall redirect "${1}" \
|
||||||
'proto:or("tcp", "udp", "tcpudp")' \
|
'proto:or(uinteger, string)' \
|
||||||
'src:string' \
|
'src:string' \
|
||||||
'src_ip:ipaddr' \
|
'src_ip:cidr' \
|
||||||
'src_dport:string' \
|
'src_dport:or(port, portrange)' \
|
||||||
'dest:string' \
|
'dest:string' \
|
||||||
'dest_ip:ipaddr' \
|
'dest_ip:cidr' \
|
||||||
'dest_port:string' \
|
'dest_port:or(port, portrange)' \
|
||||||
'target:or("SNAT", "DNAT")'
|
'target:or("SNAT", "DNAT")'
|
||||||
|
|
||||||
return $?
|
return $?
|
||||||
@ -22,11 +22,11 @@ validate_firewall_redirect()
|
|||||||
validate_firewall_rule()
|
validate_firewall_rule()
|
||||||
{
|
{
|
||||||
uci_validate_section firewall rule "${1}" \
|
uci_validate_section firewall rule "${1}" \
|
||||||
'proto:string' \
|
'proto:or(uinteger, string)' \
|
||||||
'src:string' \
|
'src:string' \
|
||||||
'dest:string' \
|
'dest:string' \
|
||||||
'src_port:string' \
|
'src_port:or(port, portrange)' \
|
||||||
'dest_port:string' \
|
'dest_port:or(port, portrange)' \
|
||||||
'target:string'
|
'target:string'
|
||||||
|
|
||||||
return $?
|
return $?
|
||||||
|
Loading…
Reference in New Issue
Block a user