mirror of
https://github.com/openwrt/packages.git
synced 2025-12-10 12:41:22 +00:00
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:
committed by
Hannu Nyman
parent
8bf5f683fe
commit
e35de9af78
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user