From 3164b99f2f9a080b0b6393c1d226dc6c43dcb97d Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Sun, 22 May 2016 17:42:22 +0200 Subject: [PATCH] openconnect: use proto_add_host_dependency This ensures that a direct route to the connected host is added by netifd. Resolves #2548 Signed-off-by: Nikos Mavrogiannopoulos --- net/openconnect/Makefile | 2 +- net/openconnect/files/openconnect.sh | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/net/openconnect/Makefile b/net/openconnect/Makefile index 40000a8837..796a6b16f3 100644 --- a/net/openconnect/Makefile +++ b/net/openconnect/Makefile @@ -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 diff --git a/net/openconnect/files/openconnect.sh b/net/openconnect/files/openconnect.sh index d5a6d32beb..560a82d6ea 100755 --- a/net/openconnect/files/openconnect.sh +++ b/net/openconnect/files/openconnect.sh @@ -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" -- 2.30.2