openconnect: corrected call to proto_add_host_dependency
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 7 Jul 2015 20:48:44 +0000 (22:48 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 7 Jul 2015 20:48:44 +0000 (22:48 +0200)
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
net/openconnect/Makefile
net/openconnect/files/openconnect.sh

index 38ac391c1877e571af13847cb058533944f67626..d0547f92b48b7cdcd093175df52e151ff68e4f35 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openconnect
 PKG_VERSION:=7.06
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_USE_MIPS16:=0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
index 9b1e652bd7e12a3c81188718d055d9fa692c41e3..0152dfefd468bb5d9a1dcfd65732b74ab94bd69b 100755 (executable)
@@ -26,11 +26,12 @@ proto_openconnect_setup() {
        json_get_vars server port username serverhash authgroup password password2 interface token_mode token_secret os csd_wrapper
 
        grep -q tun /proc/modules || insmod tun
+       ifname="vpn-$config"
 
        logger -t openconnect "initializing..."
        serv_addr=
        for ip in $(resolveip -t 10 "$server"); do
-               ( proto_add_host_dependency "$config" "$ip" $interface )
+               ( proto_add_host_dependency "$interface" "$ip" "$ifname" )
                serv_addr=1
        done
        [ -n "$serv_addr" ] || {
@@ -42,7 +43,7 @@ proto_openconnect_setup() {
 
        [ -n "$port" ] && port=":$port"
 
-       cmdline="$server$port -i vpn-$config --non-inter --syslog --script /lib/netifd/vpnc-script"
+       cmdline="$server$port -i "$ifname" --non-inter --syslog --script /lib/netifd/vpnc-script"
 
        # migrate to standard config files
        [ -f "/etc/config/openconnect-user-cert-vpn-$config.pem" ] && mv "/etc/config/openconnect-user-cert-vpn-$config.pem" "/etc/openconnect/user-cert-vpn-$config.pem"