summaryrefslogtreecommitdiff
path: root/package/network/services
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-02-18 13:34:12 +0000
committerJohn Crispin <john@openwrt.org>2014-02-18 13:34:12 +0000
commit159ee2bbd3391f82341921632d8594b7ef9fcc28 (patch)
tree074940750ef25818f5bf6593eab7c42e4e0d3be8 /package/network/services
parent7d4103ddd4411bdcefa6905c98ab0faab7d5fbd2 (diff)
downloadmtk-20170518-159ee2bbd3391f82341921632d8594b7ef9fcc28.zip
mtk-20170518-159ee2bbd3391f82341921632d8594b7ef9fcc28.tar.gz
mtk-20170518-159ee2bbd3391f82341921632d8594b7ef9fcc28.tar.bz2
relayd: add uci validation
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 39623
Diffstat (limited to 'package/network/services')
-rw-r--r--package/network/services/relayd/files/relay.init13
1 files changed, 13 insertions, 0 deletions
diff --git a/package/network/services/relayd/files/relay.init b/package/network/services/relayd/files/relay.init
index d73df6a..e193312 100644
--- a/package/network/services/relayd/files/relay.init
+++ b/package/network/services/relayd/files/relay.init
@@ -6,6 +6,19 @@ START=80
USE_PROCD=1
PROG=/usr/sbin/relayd
+validate_proto_relayd()
+{
+ uci_validate_section network "interface" "${1}" \
+ 'network:list(string)' \
+ 'expiry:uinteger:30' \
+ 'retry:uinteger:5' \
+ 'table:range(0, 65535):16800' \
+ 'forward_bcast:bool:1' \
+ 'forward_dhcp:bool:1'
+
+ return $?
+}
+
resolve_ifname() {
grep -qs "^ *$1:" /proc/net/dev && {
procd_append_param command -I "$1"