openconnect: use proto_add_host_dependency
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 22 May 2016 15:42:22 +0000 (17:42 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 22 May 2016 15:45:00 +0000 (17:45 +0200)
This ensures that a direct route to the connected host is added
by netifd.

Resolves #2548

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
net/openconnect/Makefile
net/openconnect/files/openconnect.sh

index 40000a8837da0fde8decc7313383bac99b996fd5..796a6b16f31588d72d77a0cc8477085f1069b879 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openconnect
 PKG_VERSION:=7.06
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 PKG_USE_MIPS16:=0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
index d5a6d32beb5f8512ee3cd4691f8f9fe0ca6393dd..560a82d6ea0e9399a7ff7d448916277b70db5362 100755 (executable)
@@ -28,17 +28,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"