diff options
author | Felix Fietkau <nbd@nbd.name> | 2022-08-31 13:29:32 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2022-09-01 20:42:08 +0200 |
commit | 23a7188ab47907a631951c18d93cf3fee0055a79 (patch) | |
tree | fee88017d18cffec203f770b5a3e906998234bea /package/network/services/unetd | |
parent | ab31ffc425b59afc102f8a3275791c153f39c8f4 (diff) | |
download | upstream-23a7188ab47907a631951c18d93cf3fee0055a79.tar.gz upstream-23a7188ab47907a631951c18d93cf3fee0055a79.tar.bz2 upstream-23a7188ab47907a631951c18d93cf3fee0055a79.zip |
unetd: fix handling of connect/tunnel list
change the type to array, so that uci lists can be used
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/network/services/unetd')
-rw-r--r-- | package/network/services/unetd/files/unetd.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/package/network/services/unetd/files/unetd.sh b/package/network/services/unetd/files/unetd.sh index 8e56fbd869..581eeb95fa 100644 --- a/package/network/services/unetd/files/unetd.sh +++ b/package/network/services/unetd/files/unetd.sh @@ -16,8 +16,8 @@ proto_unet_init_config() { proto_config_add_string file proto_config_add_int keepalive proto_config_add_string domain - proto_config_add_string "tunnels:list(string)" - proto_config_add_string "connect:list(string)" + proto_config_add_array "tunnels:list(string)" + proto_config_add_array "connect:list(string)" no_device=1 available=1 no_proto_task=1 @@ -27,7 +27,9 @@ proto_unet_setup() { local config="$1" local device type key file keepalive domain tunnels - json_get_vars device type auth_key key file keepalive domain tunnels connect + json_get_vars device type auth_key key file keepalive domain + json_get_values tunnels tunnels + json_get_values connect connect device="${device:-$config}" [ -n "$auth_key" ] && type="${type:-dynamic}" |