diff -Nru isc-dhcp-4.3.3/debian/changelog isc-dhcp-4.3.3/debian/changelog --- isc-dhcp-4.3.3/debian/changelog 2016-10-20 16:55:33.000000000 +0000 +++ isc-dhcp-4.3.3/debian/changelog 2016-10-21 16:46:20.000000000 +0000 @@ -1,3 +1,13 @@ +isc-dhcp (4.3.3-5ubuntu17) zesty; urgency=medium + + * debian/initramfs/lib/etc/dhcp/dhclient-enter-hooks.d/config: fix script to + not write to /run/net-$iface.conf when dealing with IPv6; which should only + write to a /run/net6-$iface.conf file. + * debian/README.Debian: document what this config script is and why a hook is + shipped for the initramfs. + + -- Mathieu Trudel-Lapierre Fri, 21 Oct 2016 12:46:20 -0400 + isc-dhcp (4.3.3-5ubuntu16) zesty; urgency=medium * ipv6: wait for duplicate address detection to finish (LP: #1633479). diff -Nru isc-dhcp-4.3.3/debian/initramfs-tools/lib/etc/dhcp/dhclient-enter-hooks.d/config isc-dhcp-4.3.3/debian/initramfs-tools/lib/etc/dhcp/dhclient-enter-hooks.d/config --- isc-dhcp-4.3.3/debian/initramfs-tools/lib/etc/dhcp/dhclient-enter-hooks.d/config 2016-10-20 16:55:33.000000000 +0000 +++ isc-dhcp-4.3.3/debian/initramfs-tools/lib/etc/dhcp/dhclient-enter-hooks.d/config 2016-10-21 16:46:20.000000000 +0000 @@ -1,9 +1,13 @@ #!/bin/sh -echo "DEVICE=$interface" >> /run/net-$interface.conf +IPVER="" +if echo "$reason" | grep -q '6$'; then + IPVER=6 +fi case "$reason" in BOUND) + echo "DEVICE=$interface" >> /run/net-$interface.conf echo "PROTO=dhcp" >> /run/net-$interface.conf echo "IPV4PROTO=dhcp" >> /run/net-$interface.conf echo "IPV4ADDR=$new_ip_address" >> /run/net-$interface.conf @@ -12,27 +16,27 @@ echo "IPV4GATEWAY=$new_routers" >> /run/net-$interface.conf echo "IPV4DNS0=$new_domain_name_servers" >> /run/net-$interface.conf echo "ROOTSERVER=$new_routers" >> /run/net-$interface.conf + if [ -n "$host_name"]; then + echo "HOSTNAME=$new_host_name" >> /run/net-$interface.conf + fi + if [ -n "$domain_name"]; then + echo "DNSDOMAIN=$new_domain_name" >> /run/net-$interface.conf + fi if [ -n "$new_domain_search"]; then echo "DOMAINSEARCH=$new_domain_search" >> /run/net-$interface.conf fi ;; BOUND6) - echo "IPV6PROTO=dhcp6" >> /run/net-$interface.conf - echo "IPV6ADDR=$new_ip6_address" >> /run/net-$interface.conf - echo "IPV6NETMASK=$new_ip6_prefixlen" >> /run/net-$interface.conf - echo "IPV6DNS0=$new_dhcp6_name_servers" >> /run/net-$interface.conf + echo "IPV6PROTO=dhcp6" >> /run/net6-$interface.conf + echo "IPV6ADDR=$new_ip6_address" >> /run/net6-$interface.conf + echo "IPV6NETMASK=$new_ip6_prefixlen" >> /run/net6-$interface.conf + echo "IPV6DNS0=$new_dhcp6_name_servers" >> /run/net6-$interface.conf if [ -n "$new_dhcp6_domain_search"]; then - echo "IPV6DOMAINSEARCH=$new_dhcp6_domain_search" >> /run/net-$interface.conf + echo "IPV6DOMAINSEARCH=$new_dhcp6_domain_search" >> /run/net6-$interface.conf fi ;; esac -if [ -n "$host_name"]; then - echo "HOSTNAME=$new_host_name" >> /run/net-$interface.conf -fi -if [ -n "$domain_name"]; then - echo "DNSDOMAIN=$new_domain_name" >> /run/net-$interface.conf -fi for prefix in '' 'cur_' 'new_' 'old_'; do # loop over the DHCP variables passed to dhclient-script @@ -50,7 +54,7 @@ # show only variables with values set if [ -n "${content}" ]; then - echo "$var='${content}'" >> /run/net-$interface.conf + echo "$var='${content}'" >> /run/net$IPVER-$interface.conf fi done done diff -Nru isc-dhcp-4.3.3/debian/README.Debian isc-dhcp-4.3.3/debian/README.Debian --- isc-dhcp-4.3.3/debian/README.Debian 2016-10-20 16:55:33.000000000 +0000 +++ isc-dhcp-4.3.3/debian/README.Debian 2016-10-21 16:46:20.000000000 +0000 @@ -34,3 +34,24 @@ profile. Please see https://wiki.ubuntu.com/DebuggingApparmor before filing a bug against this software. + +initramfs-tools hook and supplementary files +-------------------------------------------- + +isc-dhcp-client ships a hook for initramfs-tools to install dhclient in the +initramfs, so that systems may bring up IPv4 and IPv6 networking in early +userspace, in order to mount remote filesystems, etc. + +The included "config" script for dhclient-enter-hooks shipping in isc-dhcp- +client for the initramfs is based off the existing "debug" script. + +It writes out /run/net-$iface.conf and /run/net6-$iface.conf in a format that +is compatible with the old ipconfig format, along with new variables in the +same idea for IPv6 (which was not supported by ipconfig). + +For future use, all the environment variables available to dhclient hooks are +also dumped to the file, so they may be used if the compatibility ones are not +sufficient. + +See http://git.kernel.org/cgit/libs/klibc/klibc.git/tree/usr/kinit/ipconfig/README.ipconfig +