netcfg defaults hostname to DHCPv6-provided NTP server address
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
netcfg (Debian) |
Fix Released
|
Unknown
|
|||
netcfg (Ubuntu) |
Fix Released
|
Medium
|
Mathieu Trudel-Lapierre | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Yakkety |
Fix Committed
|
Undecided
|
Unassigned | ||
Zesty |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
[Impact]
IPv6 autoconfiguration installs badly records NTP server name.
[Test case]
Install Ubuntu (using d-i), in an IPv6 network. The DHCP server should provide NTP servers, but no hostname.
Verify that the default offered for the hostname during install is a correct value, and is not the hostname of the NTP server provided from DHCP.
[Regression Potential]
If any existing location depends on this bad behavior, it would obviously regress. Also to consider are cases where there might be an incorrect recording of the NTP servers or DNS nameservers, DNS search list given the changed code path in this section of the netcfg code.
Any incorrect parsing of a DHCPv6 response while autoconfiguring a system during installation would be a possible regression for this SRU.
---
When prompted for a hostname during installation, on my network the default offered is always our second NTP server's IPv6 address, which it received via stateless DHCPv6. netcfg seems to be using the wrong field as a hostname, in the absence of an explicit DHCP-provided hostname.
Installation log excerpt:
Aug 18 12:21:26 netcfg[13450]: DEBUG: IPv6 stateless autoconfig requested
Aug 18 12:21:26 netcfg[13450]: DEBUG: nc_v6_interface
Aug 18 12:21:26 netcfg[13450]: DEBUG: Running ip addr show eth0 to look for address
Aug 18 12:21:26 netcfg[13450]: DEBUG: ip line: 2: eth0: <BROADCAST,
Aug 18 12:21:26 netcfg[13450]: DEBUG: ip line: link/ether fa:ee:bd:a7:4c:0f brd ff:ff:ff:ff:ff:ff
Aug 18 12:21:26 netcfg[13450]: DEBUG: ip line: inet6 2001:630:
Aug 18 12:21:26 netcfg[13450]: DEBUG: Configured address found
Aug 18 12:21:26 netcfg[13450]: DEBUG: ip line: valid_lft 2592000sec preferred_lft 604800sec
Aug 18 12:21:26 netcfg[13450]: DEBUG: ip line: inet6 fe80::f8ee:
Aug 18 12:21:26 netcfg[13450]: DEBUG: ip line: valid_lft forever preferred_lft forever
Aug 18 12:21:26 netcfg[13450]: DEBUG: Stateless DHCPv6 requested
Aug 18 12:21:26 netcfg[13450]: WARNING **: Started DHCPv6 client; PID is 13497
Aug 18 12:21:26 dhclient[13497]: Created duid \000\003\
Aug 18 12:21:27 dhclient[13497]: XMT: Info-Request on eth0, interval 1080ms.
Aug 18 12:21:27 dhclient[13497]: RCV: Reply message on eth0 from fe80::8a5a:
Aug 18 12:21:28 netcfg[13450]: DEBUG: DHCPv6 line: nameserver[0] 2001:630:
Aug 18 12:21:28 netcfg[13450]: DEBUG: DHCPv6 line: nameserver[1] 2001:630:
Aug 18 12:21:28 netcfg[13450]: DEBUG: DHCPv6 line: nameserver[2] 2001:630:
Aug 18 12:21:28 netcfg[13450]: DEBUG: DHCPv6 line: Domain search list[0] cl.cam.ac.uk.
Aug 18 12:21:28 netcfg[13450]: DEBUG: DHCPv6 line: NTP server[0] 2001:630:
Aug 18 12:21:28 netcfg[13450]: DEBUG: DHCPv6 line: NTP server[1] 2001:630:
Aug 18 12:21:28 netcfg[13450]: DEBUG: DHCPv6 line: NTP server[2] 2001:630:
Aug 18 12:21:28 netcfg[13450]: DEBUG: DHCPv6 line: end
Aug 18 12:21:28 netcfg[13450]: DEBUG: Trying IPv4 autoconfig as well
Aug 18 12:21:28 netcfg[13450]: WARNING **: Started DHCP client; PID is 13502
Aug 18 12:21:29 dhclient[13502]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 1 (xid=0xce07ab1b)
Aug 18 12:21:30 dhclient[13502]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 1 (xid=0xce07ab1b)
Aug 18 12:21:30 dhclient[13502]: DHCPREQUEST of 128.232.81.81 on eth0 to 255.255.255.255 port 67 (xid=0x1bab07ce)
Aug 18 12:21:30 dhclient[13502]: DHCPOFFER of 128.232.81.81 from 128.232.80.7
Aug 18 12:21:30 dhclient[13502]: DHCPACK of 128.232.81.81 from 128.232.80.7
Aug 18 12:21:30 dhclient[13502]: bound to 128.232.81.81 -- renewal in 1780 seconds.
Aug 18 12:21:32 netcfg[13450]: DEBUG: Reading NTP servers from DHCP info
Aug 18 12:21:32 netcfg[13450]: DEBUG: Read NTP server 128.232.0.9
Aug 18 12:21:32 netcfg[13450]: DEBUG: Read NTP server 128.232.0.8
Aug 18 12:21:32 netcfg[13450]: DEBUG: Read NTP server 128.232.0.7
Aug 18 12:21:32 netcfg[13450]: DEBUG: Read NTP server 128.232.96.152
Aug 18 12:21:32 netcfg[13450]: DEBUG: Reading nameservers from /etc/resolv.conf
Aug 18 12:21:32 netcfg[13450]: DEBUG: Read nameserver 128.232.1.1
Aug 18 12:21:32 netcfg[13450]: DEBUG: Read nameserver 128.232.1.2
Aug 18 12:21:32 netcfg[13450]: DEBUG: Read nameserver 128.232.1.3
Aug 18 12:21:32 netcfg[13450]: DEBUG: State is now 1
Aug 18 12:21:32 netcfg[13450]: DEBUG: State is now 2
Aug 18 12:21:32 netcfg[13450]: DEBUG: State is now 5
Aug 18 12:21:32 netcfg[13450]: DEBUG: Defaulting hostname to provided DHCP hostname
...and then the installer prompts me for a hostname with a pre-filled default of "2001:630:
tags: | added: xenial yakkety |
Changed in netcfg (Ubuntu): | |
importance: | Undecided → Medium |
Changed in netcfg (Debian): | |
status: | Unknown → New |
no longer affects: | debian |
Changed in netcfg (Debian): | |
status: | New → Fix Released |
Changed in netcfg (Ubuntu): | |
assignee: | nobody → Mathieu Trudel-Lapierre (cyphermox) |
tags: | added: rls-aa-incoming |
description: | updated |
(This behaviour observed both on the Xenial server ISO and on today's daily Yakkety server ISO.)