Package: isc-dhcp
Version: 4.1.1-P1-17
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch oneiric

I tried setting up a test system to use stateless DHCPv6 (RFC3736, in
which addresses are obtained using SLAAC or similar but DHCPv6 is used
for additional configuration such as DNS servers).  In this mode,
/etc/resolv.conf is not currently set up correctly, because
dhclient-script incorrectly considers BOUND6/RENEW6/REBIND6 replies
without an IP address to be an error.  The following patch corrects
this.

  * Handle DHCPv6 BOUND6/RENEW6/REBIND6 replies that don't include an IP
    address, for stateless DHCPv6.

diff --git a/debian/dhclient-script.linux b/debian/dhclient-script.linux
index 624a17e..adaf640 100644
--- a/debian/dhclient-script.linux
+++ b/debian/dhclient-script.linux
@@ -318,14 +318,12 @@ case "$reason" in
         ;;
 
     BOUND6|RENEW6|REBIND6)
-        if [ -z "${new_ip6_address}" ] || [ -z "${new_ip6_prefixlen}" ]; then
-            exit_with_hooks 2
+        if [ "${new_ip6_address}" ] && [ "${new_ip6_prefixlen}" ]; then
+            # set leased IP
+            ip -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \
+                dev ${interface} scope global
         fi
 
-        # set leased IP
-        ip -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \
-            dev ${interface} scope global
-
         # update /etc/resolv.conf
         if [ "${reason}" = BOUND6 ] ||
            [ "${new_dhcp6_name_servers}" != "${old_dhcp6_name_servers}" ] ||

Thanks,

-- 
Colin Watson                                       [cjwat...@ubuntu.com]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to