From 61bdba21275e74d6b0a0d799a53cfb0e7b1472c2 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Tue, 18 Feb 2014 13:34:12 +0000 Subject: [PATCH] relayd: add uci validation Signed-off-by: John Crispin SVN-Revision: 39623 --- package/network/services/relayd/files/relay.init | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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" -- 2.30.2