aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Samuel Mendoza-Jonas <sam@mendozajonas.com>2021-02-01 17:54:52 -0800
committerGravatar Peter Korsgaard <peter@korsgaard.com>2021-02-03 20:29:50 +0100
commitbeb6c737b1c100c60f05709782f4f0f8a87e8ee5 (patch)
tree6bf63e2722f1f573fc4561752bbdac9a4f82b74e
parent75ef61fd4acab90496f948a5c53c1e0f3307b7a6 (diff)
downloadbuildroot-beb6c737b1c100c60f05709782f4f0f8a87e8ee5.tar.gz
buildroot-beb6c737b1c100c60f05709782f4f0f8a87e8ee5.tar.bz2
package/busybox: Fix check for IPv6 default route in udhcpc
The check for a default route is inverted, causing the script to wait for the timeout even when a default IPv6 route is available. Fix this up so that it exits early as expected. Reported-by: Bhattiprolu RaviKumar <ravikumar.bhattiprolu@gmail.com> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com> (cherry picked from commit 09ad6f392fca86dc220f0ba3129512ab4f3469e1) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rwxr-xr-xpackage/busybox/udhcpc.script2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/busybox/udhcpc.script b/package/busybox/udhcpc.script
index 0196351cd5..d375b34c42 100755
--- a/package/busybox/udhcpc.script
+++ b/package/busybox/udhcpc.script
@@ -18,7 +18,7 @@ fi
wait_for_ipv6_default_route() {
printf "Waiting for IPv6 default route to appear"
while [ $IF_WAIT_DELAY -gt 0 ]; do
- if [ -z "$(ip -6 route list | grep default)" ]; then
+ if ip -6 route list | grep -q default; then
printf "\n"
return
fi