From: Samuel Mendoza-Jonas Date: Tue, 2 Feb 2021 01:54:52 +0000 (-0800) Subject: package/busybox: Fix check for IPv6 default route in udhcpc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=09ad6f392fca86dc220f0ba3129512ab4f3469e1;p=buildroot.git 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 Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: Peter Korsgaard --- diff --git a/package/busybox/udhcpc.script b/package/busybox/udhcpc.script index ec4d9f6185..c73ad6c2ef 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