Browse Source

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>
lilik-openwrt-22.03
Florian Fainelli 10 years ago
parent
commit
70c10c0a5e
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      net/openconnect/files/openconnect.sh

+ 3
- 1
net/openconnect/files/openconnect.sh View File

@ -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'"


Loading…
Cancel
Save