aboutsummaryrefslogtreecommitdiff
path: root/net/openconnect
diff options
context:
space:
mode:
authorGavin Ni <gisngy@gmail.com>2017-11-22 10:10:22 +0800
committerYousong Zhou <yszhou4tech@gmail.com>2017-11-22 10:10:22 +0800
commit5d216df6cdf80636030fbf2c7db799063adf59f2 (patch)
treea4a6012f5862d03d46efd98cc00a105bbc1ca9af /net/openconnect
parentba9fcb1fe0acf4346b7adcae78d16c78c66f0f52 (diff)
openconnect: re-introduce config: interface
In some cases, it's useful to specify which interface to establish the VPN connection Signed-off-by: Gavin Ni <gisngy@gmail.com>
Diffstat (limited to 'net/openconnect')
-rw-r--r--net/openconnect/Makefile2
-rwxr-xr-xnet/openconnect/files/openconnect.sh5
2 files changed, 4 insertions, 3 deletions
diff --git a/net/openconnect/Makefile b/net/openconnect/Makefile
index b17c5e132..a9c66fad7 100644
--- a/net/openconnect/Makefile
+++ b/net/openconnect/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=openconnect
PKG_VERSION:=7.08
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/net/openconnect/files/openconnect.sh b/net/openconnect/files/openconnect.sh
index 4f8ee0629..7683eca8b 100755
--- a/net/openconnect/files/openconnect.sh
+++ b/net/openconnect/files/openconnect.sh
@@ -8,6 +8,7 @@ proto_openconnect_init_config() {
proto_config_add_int "port"
proto_config_add_int "mtu"
proto_config_add_int "juniper"
+ proto_config_add_string "interface"
proto_config_add_string "username"
proto_config_add_string "serverhash"
proto_config_add_string "authgroup"
@@ -24,7 +25,7 @@ proto_openconnect_init_config() {
proto_openconnect_setup() {
local config="$1"
- json_get_vars server port username serverhash authgroup password password2 token_mode token_secret os csd_wrapper mtu juniper
+ json_get_vars server port interface username serverhash authgroup password password2 token_mode token_secret os csd_wrapper mtu juniper
grep -q tun /proc/modules || insmod tun
ifname="vpn-$config"
@@ -34,7 +35,7 @@ proto_openconnect_setup() {
logger -t "openconnect" "adding host dependency for $server at $config"
for ip in $(resolveip -t 10 "$server"); do
logger -t "openconnect" "adding host dependency for $ip at $config"
- proto_add_host_dependency "$config" "$ip"
+ proto_add_host_dependency "$config" "$ip" "$interface"
done
[ -n "$port" ] && port=":$port"