Debian Bug report logs - #635897
isc-dhcp-client-udeb: add IPv6 support to dhclient-script

version graph

Package: isc-dhcp-client-udeb; Maintainer for isc-dhcp-client-udeb is Debian ISC DHCP Maintainers <isc-dhcp@packages.debian.org>;

Reported by: Colin Watson <cjwatson@ubuntu.com>

Date: Fri, 29 Jul 2011 13:48:06 UTC

Severity: wishlist

Tags: patch

Found in version isc-dhcp/4.1.1-P1-17

Fixed in version isc-dhcp/4.3.3-1

Done: Michael Gilbert <mgilbert@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, debian-boot@lists.debian.org, Debian ISC DHCP maintainers <pkg-dhcp-devel@lists.alioth.debian.org>:
Bug#635897; Package isc-dhcp-client-udeb. (Fri, 29 Jul 2011 13:48:10 GMT) (full text, mbox, link).


Acknowledgement sent to Colin Watson <cjwatson@ubuntu.com>:
New Bug report received and forwarded. Copy sent to debian-boot@lists.debian.org, Debian ISC DHCP maintainers <pkg-dhcp-devel@lists.alioth.debian.org>. (Fri, 29 Jul 2011 13:48:10 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Colin Watson <cjwatson@ubuntu.com>
To: submit@bugs.debian.org
Subject: isc-dhcp-client-udeb: add IPv6 support to dhclient-script
Date: Fri, 29 Jul 2011 14:09:24 +0100
Package: isc-dhcp-client-udeb
Version: 4.1.1-P1-17
Severity: wishlist
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch oneiric

It would be helpful if the Linux udeb variant of dhclient-script
supported IPv6, since we're preparing to land IPv6 support in d-i quite
soon.  Could you please review this patch for that, which mostly
consists of copying stuff over from dhclient-script.linux and stripping
it down in much the same way that the udeb variant was already stripped
down?

  * Add DHCPv6 support to dhclient-script.linux.udeb.

diff --git a/debian/dhclient-script.linux.udeb b/debian/dhclient-script.linux.udeb
index 505b035..983176e 100644
--- a/debian/dhclient-script.linux.udeb
+++ b/debian/dhclient-script.linux.udeb
@@ -14,6 +14,7 @@ set -e
 make_resolv_conf() {
     local new_resolv_conf
 
+    # DHCPv4
     if [ -n "$new_domain_name" ] || [ -n "$new_domain_name_servers" ]; then
         new_resolv_conf=/etc/resolv.conf.dhclient-new
         rm -f $new_resolv_conf
@@ -27,6 +28,20 @@ make_resolv_conf() {
         done
 
         mv $new_resolv_conf /etc/resolv.conf
+    # DHCPv6
+    elif [ -n "$new_dhcp6_domain_search" ] || [ -n "$new_dhcp6_name_servers" ]; then
+        new_resolv_conf=/etc/resolv.conf.dhclient-new
+        rm -f $new_resolv_conf
+
+        if [ -n "$new_dhcp6_domain_search" ]; then
+            echo "search $new_dhcp6_domain_search" >> $new_resolv_conf
+        fi
+
+        for nameserver in $new_dhcp6_name_servers; do
+            echo "nameserver $nameserver" >>$new_resolv_conf
+        done
+
+        mv $new_resolv_conf /etc/resolv.conf
     fi
 }
 
@@ -56,11 +71,14 @@ fi
 
 # Execute the operation
 case "$reason" in
+
+    ### DHCPv4 Handlers
+
     MEDIUM|ARPCHECK|ARPSEND)
         # Do nothing
         ;;
     PREINIT)
-        ip link set $interface up
+        ip link set dev $interface up
 
         # We need to give the kernel some time to get the interface up.
         sleep 1
@@ -72,26 +90,20 @@ case "$reason" in
 
         if [ -n "$old_ip_address" ] &&
            [ "$old_ip_address" != "$new_ip_address" ]; then
-            # IP address changed. Bringing down the interface will delete all routes,
-            # and clear the ARP cache.
-            ip addr del $old_ip_address$old_mask $old_broadcast_arg dev $interface
-            ip link set $interface down
-        fi
-
-        if [ -n "$new_interface_mtu" ]; then
-            ip link set $interface mtu $new_interface_mtu || true
+            ip -4 addr flush dev $interface
         fi
 
         if [ -z "$old_ip_address" ] ||
            [ "$old_ip_address" != "$new_ip_address" ] ||
            [ "$reason" = "BOUND" ] || [ "$reason" = "REBOOT" ]; then
+            ip -4 addr add $new_ip_address$new_mask $new_broadcast_arg dev $interface
 
-            ip link set $interface up
-            ip addr flush dev $interface
-            ip addr add $new_ip_address$new_mask $new_broadcast_arg dev $interface
+            if [ -n "$new_interface_mtu" ]; then
+                ip link set $interface mtu $new_interface_mtu || true
+            fi
 
             for router in $new_routers; do
-                ip route add default via $router
+                ip -4 route add default via $router dev $interface
             done
         fi
 
@@ -108,9 +120,7 @@ case "$reason" in
 
     EXPIRE|FAIL|RELEASE|STOP)
         if [ -n "$old_ip_address" ]; then
-            # Shut down interface, which will delete routes and clear arp cache.
-            ip addr flush dev $interface
-            ip link set $interface down
+            ip -4 addr flush dev $interface
         fi
 
         ;;
@@ -119,6 +129,46 @@ case "$reason" in
         ip link set $interface down
 
         ;;
+
+    ### DHCPv6 Handlers
+    # TODO handle prefix change: ?based on ${old_ip6_prefix} and ${new_ip6_prefix}?
+
+    PREINIT6)
+        # ensure interface is up
+        ip link set $interface up
+
+        # flush any stale global permanent IPs from interface
+        ip -6 addr flush dev $interface scope global permanent
+
+        ;;
+
+    BOUND6|RENEW6|REBIND6)
+        if [ "$new_ip6_address" ] && [ "$new_ip6_prefixlen" ]; then
+            ip -6 addr add $new_ip6_address/$new_ip6_prefixlen \
+                dev $interface scope global
+        fi
+
+        make_resolv_conf
+
+        # Get the domain name into a file suitable for netcfg to read.
+        printf "${new_dhcp6_domain_search%% *}" > /tmp/domain_name
+
+        ;;
+
+    DEPREF6)
+        if [ "$new_ip6_prefixlen" ]; then
+            ip -6 addr change $cur_ip6_address/$cur_ip6_prefixlen \
+                dev $interface scope global preferred_lft 0
+        fi
+
+        ;;
+
+    EXPIRE6|RELEASE6|STOP6)
+        if [ "$old_ip6_address" ] && [ "$old_ip6_prefixlen" ]; then
+            ip -6 addr del $old_ip6_address/$old_ip6_prefixlen dev $interface
+        fi
+
+        ;;
 esac
 
 exit 0

Thanks,

-- 
Colin Watson                                       [cjwatson@ubuntu.com]




Reply sent to Michael Gilbert <mgilbert@debian.org>:
You have taken responsibility. (Sat, 05 Sep 2015 21:57:07 GMT) (full text, mbox, link).


Notification sent to Colin Watson <cjwatson@ubuntu.com>:
Bug acknowledged by developer. (Sat, 05 Sep 2015 21:57:07 GMT) (full text, mbox, link).


Message #10 received at 635897-close@bugs.debian.org (full text, mbox, reply):

From: Michael Gilbert <mgilbert@debian.org>
To: 635897-close@bugs.debian.org
Subject: Bug#635897: fixed in isc-dhcp 4.3.3-1
Date: Sat, 05 Sep 2015 21:52:40 +0000
Source: isc-dhcp
Source-Version: 4.3.3-1

We believe that the bug you reported is fixed in the latest version of
isc-dhcp, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 635897@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Michael Gilbert <mgilbert@debian.org> (supplier of updated isc-dhcp package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 05 Sep 2015 19:20:42 +0000
Source: isc-dhcp
Binary: isc-dhcp-server isc-dhcp-dbg isc-dhcp-server-ldap isc-dhcp-common isc-dhcp-dev isc-dhcp-client isc-dhcp-client-udeb isc-dhcp-relay
Architecture: source
Version: 4.3.3-1
Distribution: unstable
Urgency: medium
Maintainer: Debian ISC DHCP maintainers <pkg-dhcp-devel@lists.alioth.debian.org>
Changed-By: Michael Gilbert <mgilbert@debian.org>
Description:
 isc-dhcp-client - DHCP client for automatically obtaining an IP address
 isc-dhcp-client-udeb - ISC DHCP Client for debian-installer (udeb)
 isc-dhcp-common - common files used by all of the isc-dhcp packages
 isc-dhcp-dbg - ISC DHCP server for automatic IP address assignment (debuging sym
 isc-dhcp-dev - API for accessing and modifying the DHCP server and client state
 isc-dhcp-relay - ISC DHCP relay daemon
 isc-dhcp-server - ISC DHCP server for automatic IP address assignment
 isc-dhcp-server-ldap - DHCP server that uses LDAP as its backend
Closes: 604883 635897 688339 691090 790164 797276
Changes:
 isc-dhcp (4.3.3-1) unstable; urgency=medium
 .
   * New upstream release.
   * Add uversionmangle to debian/watch.
   * Restore Enhances field for the ldap package (closes: #790164).
   * Add a logcheck snippet for the server package (closes: #688339).
     - Thanks to Jonathan Wiltshire.
   * Add DHCPv6 support to dhclient-script.linux.udeb (closes: #635897).
     - Thanks to Colin Watson.
   * Add policycoreutils dependency to isc-dhcp-server (closes: #797276).
   * Fix undefined variables in dhclient-script.kfreebsd (closes: #691090).
     - Thanks to Peter Marschall.
   * Avoid condition where hostname could be set to '(none)' (closes: #604883).
     - Thanks to Pavel Cahyna.
Checksums-Sha1:
 a3f3631e5be4c968db7c2f5fda19dc946527324a 3224 isc-dhcp_4.3.3-1.dsc
 0d8bdb50245f744e1b361ddb693072955ea3bded 1094938 isc-dhcp_4.3.3.orig.tar.gz
 edbb1eeed2399e5c333bd5bb2fe6625f469ace7a 79444 isc-dhcp_4.3.3-1.debian.tar.xz
Checksums-Sha256:
 129caf8947632b61f3e38a400b94a4b9cbe1c49e69bf66c301eca0faa7c9cd2a 3224 isc-dhcp_4.3.3-1.dsc
 13d2bbc4536dfb2cd8f0fb0ac33a4bc7acec7ac013eb82ff44597de191b97dcb 1094938 isc-dhcp_4.3.3.orig.tar.gz
 c5d5f8e92cabbea9124587e172c70c79a5597789fa3d0bcd51fd14a1e2cd965d 79444 isc-dhcp_4.3.3-1.debian.tar.xz
Files:
 5b6fdcc01e02351b197c62b081378d2a 3224 net important isc-dhcp_4.3.3-1.dsc
 b8aab8e7aff6c6ebade443732425c78d 1094938 net important isc-dhcp_4.3.3.orig.tar.gz
 04b40775d3b5c192cab49f8398138a62 79444 net important isc-dhcp_4.3.3-1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQQcBAEBCgAGBQJV60v5AAoJELjWss0C1vRzfMQgAJtH3XXI3RGt+ZZ9UWahFuiG
+6fKFfQ+kOgcNAIfcqTriOrja3twFuwqW6K6ZwigOoTfPZuayeeGGk/icx11STHm
n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rXgJx1pqx6yo7mxNcufpaCxcR
nxfl6t9zVhfDpp5D9aYJUILMBUTuLXW7CTG2VuTBFL5ehf3hGWQh8rQQzr+/Qaef
hnAXLrnDrF5Il3Yab7J13Lk8KMMHh0RHoGGRtLuanLZhkZAquLHdUdBgnPhBBQ64
s5Gqt7IQ7gkvRBpjmNAnuN/XAtPvC0tLxTZLTzD7VdEIeRb4xSo3pO4gKPmH+gU=
=fsvN
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 04 Oct 2015 08:28:02 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Mar 9 06:23:23 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.