Skip to content

Commit 25cd88c

Browse files
committed
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: 20ea726 ("openconnect: make host dependency more resilient") Signed-off-by: Christian Lamparter <[email protected]>
1 parent ba55134 commit 25cd88c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

net/openconnect/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
99

1010
PKG_NAME:=openconnect
1111
PKG_VERSION:=9.12
12-
PKG_RELEASE:=5
12+
PKG_RELEASE:=6
1313

1414
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
1515
PKG_SOURCE_URL:=https://www.infradead.org/openconnect/download

net/openconnect/files/openconnect.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ proto_openconnect_setup() {
8686
[ -n $uri ] && server=$(echo $uri | awk -F[/:] '{print $4}')
8787

8888
logger -t "openconnect" "adding host dependency for $server at $config"
89-
while resolveip -t 10 "$server" > "$tmpfile" && [ "$trials" -gt 0 ]; do
89+
while ! resolveip -t 10 "$server" > "$tmpfile" && [ "$trials" -gt 0 ]; do
9090
sleep 5
9191
trials=$((trials - 1))
9292
done

0 commit comments

Comments
 (0)