Skip to contentSkip to conversation

package/busybox: Fix check for IPv6 default route in udhcpc

PATCH New Samuel Mendoza-Jonas 2 participants 3 messages Feb 2, 2021 – Feb 3, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 package/busybox/udhcpc.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/busybox/udhcpc.script +1 -1
index ec4d9f6185..c73ad6c2ef 100755
@@ -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
Signature · 1 line
2.30.0
#1 lore raw

PATCH 1/1 package/busybox: Fix check for IPv6 default route in udhcpc

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Mendoza-Jonas <[email protected]> writes:

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.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 package/busybox: Fix check for IPv6 default route in udhcpc

In reply to Samuel Mendoza-Jonas
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Mendoza-Jonas <[email protected]> writes:

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.

Committed to 2020.02.x and 2020.11.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard