Revert "openconnect: drop the dependency on resolveip"

Using resolveip is more robust and predictable than depending on nslookup and
awk.

This reverts commit 131ec7b3bd.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
This commit is contained in:
Rui Salvaterra 2022-05-31 10:47:01 +01:00 committed by Rosen Penev
parent 8089548622
commit 2ab669d0b9
2 changed files with 2 additions and 2 deletions

View file

@ -35,7 +35,7 @@ endef
define Package/openconnect define Package/openconnect
SECTION:=net SECTION:=net
CATEGORY:=Network CATEGORY:=Network
DEPENDS:=+libxml2 +kmod-tun +vpnc-scripts +OPENCONNECT_OPENSSL:libopenssl +OPENCONNECT_OPENSSL:p11-kit +OPENCONNECT_OPENSSL:libp11 +OPENCONNECT_GNUTLS:libgnutls +OPENCONNECT_GNUTLS:libtasn1 +OPENCONNECT_STOKEN:libstoken $(ICONV_DEPENDS) $(INTL_DEPENDS) DEPENDS:=+libxml2 +kmod-tun +resolveip +vpnc-scripts +OPENCONNECT_OPENSSL:libopenssl +OPENCONNECT_OPENSSL:p11-kit +OPENCONNECT_OPENSSL:libp11 +OPENCONNECT_GNUTLS:libgnutls +OPENCONNECT_GNUTLS:libtasn1 +OPENCONNECT_STOKEN:libstoken $(ICONV_DEPENDS) $(INTL_DEPENDS)
TITLE:=OpenConnect VPN client (Cisco AnyConnect and Juniper/Pulse compatible) TITLE:=OpenConnect VPN client (Cisco AnyConnect and Juniper/Pulse compatible)
MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com> MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
URL:=https://www.infradead.org/openconnect/ URL:=https://www.infradead.org/openconnect/

View file

@ -67,7 +67,7 @@ proto_openconnect_setup() {
logger -t openconnect "initializing..." logger -t openconnect "initializing..."
logger -t "openconnect" "adding host dependency for $server at $config" logger -t "openconnect" "adding host dependency for $server at $config"
for ip in $(nslookup "$server" | awk '/^Name:/ {getline; print $2;}'); do for ip in $(resolveip -t 10 "$server"); do
logger -t "openconnect" "adding host dependency for $ip at $config" logger -t "openconnect" "adding host dependency for $ip at $config"
proto_add_host_dependency "$config" "$ip" "$interface" proto_add_host_dependency "$config" "$ip" "$interface"
done done