diff options
author | John Crispin <blogic@openwrt.org> | 2014-02-18 13:34:12 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-02-18 13:34:12 +0000 |
commit | 7e90362903d4bce505ecdc464a368d53162307c3 (patch) | |
tree | a17e00a07ffec04f96028186464d7de855f447fe /package/network/services/relayd/files/relay.init | |
parent | ceda071dfb6e560825aa917e73cbe4ddc50612c2 (diff) | |
download | upstream-7e90362903d4bce505ecdc464a368d53162307c3.tar.gz upstream-7e90362903d4bce505ecdc464a368d53162307c3.tar.bz2 upstream-7e90362903d4bce505ecdc464a368d53162307c3.zip |
relayd: add uci validation
Signed-off-by: John Crispin <blogic@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39623 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/services/relayd/files/relay.init')
-rw-r--r-- | package/network/services/relayd/files/relay.init | 13 |
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 d73df6ab55..e193312e6e 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" |