Skip to contentSkip to conversation

busybox: udhcpc: fix IPv6 support when using udhcpc

PATCH New Stefan Agner 1 participant 1 message Dec 19, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 busybox: udhcpc: fix IPv6 support when using udhcpc

From: Stefan Agner <[email protected]>

The udhcpc script calls ip addr flush .. which flushes addresses of any address family, including IPv6. However, busybox udhcpc is IPv4 only and should not influence IPv6 addressing. Hence use ip addr flush with family constrait.

The script particularly broke IPv6 SLAAC: Typically when udhcpc calls the script the kernel already assigned the IPv6 link-local address. The flush removes the link-local IPv6 address again and prohibits proper IPv6 operation such as SLAAC since neighbor discovery protocol relies on IPv6 link-local addressing.

---
 meta/recipes-core/busybox/files/simple.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/busybox/files/simple.script +1 -1
index 6ed0293525..8b5eb53633 100644
@@ -28,7 +28,7 @@ case "$1" in
 		fi
 		if ! root_is_nfs ; then
                         if [ $have_bin_ip -eq 1 ]; then
-                                /SBIN_DIR/ip addr flush dev $interface
+                                /SBIN_DIR/ip -4 addr flush dev $interface
                                 /SBIN_DIR/ip link set dev $interface up
                         else
                                 /SBIN_DIR/ifconfig $interface 0.0.0.0
Signature · 1 line
2.13.6