Comment 0 for bug 1634176

Revision history for this message
Scott Moser (smoser) wrote :

Changes were initially made under bug 1621507 that changed the behavior of the linitramfs when 'ip=' was seen on the kernel command line. The changes were done to support doing an ipv6 dhcp request in addition to the expected ipv4 dhcp request.

The result is that in all cases where 'ip=' is found on the kernel command line the initramfs will invoke 'dhclient -6'. In all cases now, the changes that have occurred are:
 * initramfs now issues an ipv6 dhclient request
 * if no ipv6 dhcp server is available, the system waits unnecessarily for a response.
 * worst case scenario (admittedly unlikely), a system could now get a world-routable ipv6 address that previously was not exposed to the internet.

The implementation has inconsistent behavior based on how quickly or if at all a dhcpv4/dhcpv6 server is found. Things that can happen:
 a.) system uses only dhcpv4, timing out before dhcp6 was found or bug 1633479 causes dhclient -6 to fail.
 b.) system uses only dhcpv6 address
 c.) system gets no dhclient response (v4 or v6) but uses link-local address to successfully reach its mount target.
 d.) the hostname provided in ip= command line not sent in the dhcp request as it would be with 'ipconfig' implementation.

The way this should have been handled in a SRU was to require users who needed rthe new ipv6 functionality to explicitly request it.

One way this could have been done would have been to extend the 'ip=' command
line function. klibc documents the previous ip= syntax at README.ipconfig [1].
  <client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>

My suggestion is to extend the 'autoconf' parameter. Previously the supported documented values were 'rarp', 'bootp', 'both', 'dhcp', 'all', 'off', 'static', 'none'. I suggest we add 'dhcp6' to the the list.

Additionally, I believe we should revert changes made 0.125ubuntu3 to finding further regressions.

--
[1] https://github.com/codehelp/klibc-aarch64/blob/master/usr/kinit/ipconfig/README.ipconfig

Related bugs:
 * bug 1633479: dhclient does not wait for ipv6 dad (duplicate address detection)
 * bug 1631474: No networking with initramfs-tools 0.122ubuntu8.3 and ip=dhcp boot option
 * bug 1628306: network booting fails for iscsi root if no ip is set
 * bug 1621507: initramfs-tools configure_networking() fails to dhcp ipv6 addresses
 * bug 1633619: dhclient -1 exits 0 when no lease found

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: initramfs-tools 0.125ubuntu5
ProcVersionSignature: Ubuntu 4.8.0-22.24-generic 4.8.0
Uname: Linux 4.8.0-22-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
ApportVersion: 2.20.3-0ubuntu8
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Oct 17 11:14:00 2016
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-07-23 (452 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Alpha amd64 (20150722.1)
PackageArchitecture: all
SourcePackage: initramfs-tools
UpgradeStatus: No upgrade log present (probably fresh install)