aboutsummaryrefslogtreecommitdiff
path: root/net/openconnect/files
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2016-05-22 17:42:22 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2016-05-22 17:42:34 +0200
commit4083de9d74c1680f7228611612399b4526ee5afc (patch)
treee342381d23583c939eb3edd1870950d114e0e52f /net/openconnect/files
parenta26fd756db6864fd7be7dc7035336537fd3cfe6d (diff)
openconnect: use proto_add_host_dependency
This ensures that a direct route to the connected host is added by netifd. Resolves #2548
Diffstat (limited to 'net/openconnect/files')
-rwxr-xr-xnet/openconnect/files/openconnect.sh17
1 files changed, 6 insertions, 11 deletions
diff --git a/net/openconnect/files/openconnect.sh b/net/openconnect/files/openconnect.sh
index ecdd66a5b..881baccf1 100755
--- a/net/openconnect/files/openconnect.sh
+++ b/net/openconnect/files/openconnect.sh
@@ -29,17 +29,12 @@ proto_openconnect_setup() {
ifname="vpn-$config"
logger -t openconnect "initializing..."
-# serv_addr=
-# for ip in $(resolveip -t 10 "$server"); do
-# ( proto_add_host_dependency "$interface" "$ip" "$ifname" )
-# serv_addr=1
-# done
-# [ -n "$serv_addr" ] || {
-# logger -t openconnect "Could not resolve server address: '$server'"
-# sleep 5
-# proto_setup_failed "$config"
-# exit 1
-# }
+
+ 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"
+ done
[ -n "$port" ] && port=":$port"