From e35de9af78e3ce12eb810e8d58be83c850c319d4 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Sat, 6 Dec 2025 20:53:14 +0100 Subject: [PATCH] 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: 20ea72607bbf ("openconnect: make host dependency more resilient") Signed-off-by: Christian Lamparter --- net/openconnect/Makefile | 2 +- net/openconnect/files/openconnect.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/openconnect/Makefile b/net/openconnect/Makefile index c3101919f6..6ce0c20c73 100644 --- a/net/openconnect/Makefile +++ b/net/openconnect/Makefile @@ -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 diff --git a/net/openconnect/files/openconnect.sh b/net/openconnect/files/openconnect.sh index 69052e767d..ae8408b19e 100755 --- a/net/openconnect/files/openconnect.sh +++ b/net/openconnect/files/openconnect.sh @@ -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