openconnect: fix off-by-one while condition

resolveip returns 0 on success. This means that the while loop
will just run until all tries are exhausted. But this was not
the intended behaviour.

Fixes: 20ea72607b ("openconnect: make host dependency more resilient")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
This commit is contained in:
Christian Lamparter
2025-12-06 20:53:14 +01:00
committed by Hannu Nyman
parent 8bf5f683fe
commit e35de9af78
2 changed files with 2 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=openconnect
PKG_VERSION:=9.12
PKG_RELEASE:=5
PKG_RELEASE:=6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.infradead.org/openconnect/download

View File

@@ -86,7 +86,7 @@ proto_openconnect_setup() {
[ -n $uri ] && server=$(echo $uri | awk -F[/:] '{print $4}')
logger -t "openconnect" "adding host dependency for $server at $config"
while resolveip -t 10 "$server" > "$tmpfile" && [ "$trials" -gt 0 ]; do
while ! resolveip -t 10 "$server" > "$tmpfile" && [ "$trials" -gt 0 ]; do
sleep 5
trials=$((trials - 1))
done