Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39649
3c298f89-4303-0410-b956-
a3cf2f4a3e73
validate_firewall_redirect()
{
uci_validate_section firewall redirect "${1}" \
validate_firewall_redirect()
{
uci_validate_section firewall redirect "${1}" \
- 'proto:or("tcp", "udp", "tcpudp")' \
+ 'proto:or(uinteger, string)' \
- 'src_ip:ipaddr' \
- 'src_dport:string' \
+ 'src_ip:cidr' \
+ 'src_dport:or(port, portrange)' \
- 'dest_ip:ipaddr' \
- 'dest_port:string' \
+ 'dest_ip:cidr' \
+ 'dest_port:or(port, portrange)' \
'target:or("SNAT", "DNAT")'
return $?
'target:or("SNAT", "DNAT")'
return $?
validate_firewall_rule()
{
uci_validate_section firewall rule "${1}" \
validate_firewall_rule()
{
uci_validate_section firewall rule "${1}" \
+ 'proto:or(uinteger, string)' \
'src:string' \
'dest:string' \
'src:string' \
'dest:string' \
- 'src_port:string' \
- 'dest_port:string' \
+ 'src_port:or(port, portrange)' \
+ 'dest_port:or(port, portrange)' \
'target:string'
return $?
'target:string'
return $?