mirror of
https://github.com/openwrt/packages.git
synced 2025-12-26 11:16:31 +04:00
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>
This commit is contained in:
@@ -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'"
|
||||
|
||||
Reference in New Issue
Block a user