From b1f228f4cf0b9871c0d7d009c0e97a40ddb9d629 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sat, 4 Apr 2015 12:32:59 -0700 Subject: [PATCH] openconnect: allow specifying a custom CSD wrapper script Some VPN servers might be configured in a way that a CSD wrapper script is mandatory to complete the authentication process, allow that to be specified for openconnect. Signed-off-by: Florian Fainelli --- net/openconnect/files/openconnect.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/openconnect/files/openconnect.sh b/net/openconnect/files/openconnect.sh index 87c42acc3a..0e22e1b605 100755 --- a/net/openconnect/files/openconnect.sh +++ b/net/openconnect/files/openconnect.sh @@ -14,6 +14,7 @@ proto_openconnect_init_config() { proto_config_add_string "token_secret" proto_config_add_string "interface" proto_config_add_string "os" + proto_config_add_string "csd_wrapper" no_device=1 available=1 } @@ -21,7 +22,7 @@ proto_openconnect_init_config() { proto_openconnect_setup() { local config="$1" - json_get_vars server port username serverhash authgroup password interface token_mode token_secret os + json_get_vars server port username serverhash authgroup password interface token_mode token_secret os csd_wrapper grep -q tun /proc/modules || insmod tun @@ -70,6 +71,7 @@ proto_openconnect_setup() { [ -n "$token_mode" ] && append cmdline "--token-mode=$token_mode" [ -n "$token_secret" ] && append cmdline "--token-secret=$token_secret" [ -n "$os" ] && append cmdline "--os=$os" + [ -n "$csd_wrapper" ] && [ -x "$csd_wrapper" ] && append cmdline "--csd-wrapper=$csd_wrapper" proto_export INTERFACE="$config" logger -t openconnect "executing 'openconnect $cmdline'" -- 2.30.2