package/busybox: update udhcpc.script for stateful DHCPv6
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>
Tue, 21 May 2019 02:54:27 +0000 (12:54 +1000)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 27 Oct 2019 19:24:33 +0000 (20:24 +0100)
udhcpc6 will call the default script with the stateful address set in the
"ipv6" variable.  Set "ip" to this address if present, using the /128 prefix
used by stateful DHCPv6 so the existing renew/bound logic can be used like
in DHCPv4.

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/busybox/udhcpc.script

index 131c138b1a408287121cb8eeb63e24d6ab44a8fa..c2804a3b5a240af395e8e28802d997ae6837dbdc 100755 (executable)
@@ -8,6 +8,8 @@ RESOLV_CONF="/etc/resolv.conf"
 [ -e $RESOLV_CONF ] || touch $RESOLV_CONF
 [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
 [ -n "$subnet" ] && NETMASK="netmask $subnet"
+# Handle stateful DHCPv6 like DHCPv4
+[ -n "$ipv6" ] && ip="$ipv6/128"
 
 case "$1" in
        deconfig)