aboutsummaryrefslogtreecommitdiff
path: root/net/openconnect/files
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2015-04-04 12:31:49 -0700
committerFlorian Fainelli <florian@openwrt.org>2015-04-04 12:31:49 -0700
commit70c10c0a5e80a53a2090698730033d91da98cd1c (patch)
treef45356495c601a3af848bd5be14dc4bd0bc88e6b /net/openconnect/files
parent692ee8cf18d098608ae6c4294eceeee1605d974c (diff)
openconnect: allow specifying "os"
Some servers might be implementing ACLs based on the value specified by openconnect for "os", allow that to be configured. Signed-off-by: Florian Fainelli <florian@openwrt.org>
Diffstat (limited to 'net/openconnect/files')
-rwxr-xr-xnet/openconnect/files/openconnect.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/openconnect/files/openconnect.sh b/net/openconnect/files/openconnect.sh
index bdac9bc86..87c42acc3 100755
--- a/net/openconnect/files/openconnect.sh
+++ b/net/openconnect/files/openconnect.sh
@@ -13,6 +13,7 @@ proto_openconnect_init_config() {
proto_config_add_string "token_mode"
proto_config_add_string "token_secret"
proto_config_add_string "interface"
+ proto_config_add_string "os"
no_device=1
available=1
}
@@ -20,7 +21,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
+ json_get_vars server port username serverhash authgroup password interface token_mode token_secret os
grep -q tun /proc/modules || insmod tun
@@ -68,6 +69,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"
proto_export INTERFACE="$config"
logger -t openconnect "executing 'openconnect $cmdline'"