diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2014-02-21 00:17:04 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2014-02-21 00:17:04 +0000 |
commit | 0d02f32a1762a9dd4a6c17f7979fd9985cb13590 (patch) | |
tree | 390b29504ef9e21ae8a40882c97182db06e79c04 /package | |
parent | 75f88cf3fe6f292b3bc2adb83747b95e07096be2 (diff) | |
download | master-187ad058-0d02f32a1762a9dd4a6c17f7979fd9985cb13590.tar.gz master-187ad058-0d02f32a1762a9dd4a6c17f7979fd9985cb13590.tar.bz2 master-187ad058-0d02f32a1762a9dd4a6c17f7979fd9985cb13590.zip |
netifd: fix validation constraints
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39648 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rwxr-xr-x | package/network/config/netifd/files/etc/init.d/network | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/package/network/config/netifd/files/etc/init.d/network b/package/network/config/netifd/files/etc/init.d/network index 848336f4fa..db07c1e664 100755 --- a/package/network/config/netifd/files/etc/init.d/network +++ b/package/network/config/netifd/files/etc/init.d/network @@ -57,12 +57,12 @@ validate_route_section() { uci_validate_section network route "${1}" \ 'interface:string' \ - 'target:ip4addr' \ - 'netmask:ip4prefix' \ + 'target:cidr4' \ + 'netmask:netmask4' \ 'gateway:ip4addr' \ 'metric:uinteger' \ 'mtu:uinteger' \ - 'table:range(0,65535)' + 'table:or(range(0,65535),string)' return $? } @@ -71,11 +71,11 @@ validate_route6_section() { uci_validate_section network route6 "${1}" \ 'interface:string' \ - 'target:ip6addr' \ + 'target:cidr6' \ 'gateway:ip6addr' \ 'metric:uinteger' \ 'mtu:uinteger' \ - 'table:range(0,65535)' + 'table:or(range(0,65535),string)' return $? } @@ -85,12 +85,12 @@ validate_rule_section() uci_validate_section network rule "${1}" \ 'in:string' \ 'out:string' \ - 'src:ip4prefix' \ - 'dest:ip4prefix' \ - 'tos:rage(0.31)' \ - 'string:mark' \ + 'src:cidr4' \ + 'dest:cidr4' \ + 'tos:range(0,31)' \ + 'mark:string' \ 'invert:bool' \ - 'lookup:range(0,65535)' \ + 'lookup:or(range(0,65535),string)' \ 'goto:range(0,65535)' \ 'action:or("prohibit", "unreachable", "blackhole", "throw")' @@ -102,12 +102,12 @@ validate_rule6_section() uci_validate_section network rule6 "${1}" \ 'in:string' \ 'out:string' \ - 'src:ip4prefix' \ - 'dest:ip4prefix' \ - 'tos:rage(0.31)' \ - 'string:mark' \ + 'src:cidr6' \ + 'dest:cidr6' \ + 'tos:range(0,31)' \ + 'mark:string' \ 'invert:bool' \ - 'lookup:range(0,65535)' \ + 'lookup:or(range(0,65535),string)' \ 'goto:range(0,65535)' \ 'action:or("prohibit", "unreachable", "blackhole", "throw")' |