[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#862745: marked as done (netcfg incorrectly defaults hostname to DHCPv6-provided NTP server address)

Your message dated Tue, 16 May 2017 22:19:12 +0000
with message-id <E1dAkoC-000D2K-12@fasolo.debian.org>
and subject line Bug#862745: fixed in netcfg 1.142
has caused the Debian Bug report #862745,
regarding netcfg incorrectly defaults hostname to DHCPv6-provided NTP server address
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org

862745: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=862745
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: netcfg
Version: 1.141

netcfg uses a NTP server address from DHCPv6 as the default hostname (in the absence of a hostname explicitly provided via DHCP), due to a typo in autoconfig.c.

Patch attached.

Installation log excerpt:

netcfg[13450]: DEBUG: IPv6 stateless autoconfig requested
netcfg[13450]: DEBUG: nc_v6_interface_configured(eth0, scope global)
netcfg[13450]: DEBUG: Running ip addr show eth0 to look for address
netcfg[13450]: DEBUG: ip line: 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq qlen 1000
netcfg[13450]: DEBUG: ip line: link/ether fa:ee:bd:a7:4c:0f brd ff:ff:ff:ff:ff:ff
netcfg[13450]: DEBUG: ip line: inet6 2001:630:212:252:f8ee:bdff:fea7:4c0f/64 scope global dynamic
netcfg[13450]: DEBUG: Configured address found
netcfg[13450]: DEBUG: ip line: valid_lft 2592000sec preferred_lft 604800sec
netcfg[13450]: DEBUG: ip line: inet6 fe80::f8ee:bdff:fea7:4c0f/64 scope link
netcfg[13450]: DEBUG: ip line: valid_lft forever preferred_lft forever
netcfg[13450]: DEBUG: Stateless DHCPv6 requested
netcfg[13450]: WARNING **: Started DHCPv6 client; PID is 13497
dhclient[13497]: Created duid \000\003\000\001\372\356\275\247L\017.
dhclient[13497]: XMT: Info-Request on eth0, interval 1080ms.
dhclient[13497]: RCV: Reply message on eth0 from fe80::8a5a:92ff:fecd:8da7.
netcfg[13450]: DEBUG: DHCPv6 line: nameserver[0] 2001:630:212:200::d:0
netcfg[13450]: DEBUG: DHCPv6 line: nameserver[1] 2001:630:212:200::d:1
netcfg[13450]: DEBUG: DHCPv6 line: nameserver[2] 2001:630:212:200::d:2
netcfg[13450]: DEBUG: DHCPv6 line: Domain search list[0] cl.cam.ac.uk.
netcfg[13450]: DEBUG: DHCPv6 line: NTP server[0] 2001:630:212:200::123:1a
netcfg[13450]: DEBUG: DHCPv6 line: NTP server[1] 2001:630:212:200::123:1b
netcfg[13450]: DEBUG: DHCPv6 line: NTP server[2] 2001:630:212:200::123:1c
netcfg[13450]: DEBUG: DHCPv6 line: end
netcfg[13450]: DEBUG: Trying IPv4 autoconfig as well
netcfg[13450]: WARNING **: Started DHCP client; PID is 13502
dhclient[13502]: DHCPDISCOVER on eth0 to port 67 interval 1 (xid=0xce07ab1b)
dhclient[13502]: DHCPDISCOVER on eth0 to port 67 interval 1 (xid=0xce07ab1b)
dhclient[13502]: DHCPREQUEST of on eth0 to port 67 (xid=0x1bab07ce)
dhclient[13502]: DHCPOFFER of from
dhclient[13502]: DHCPACK of from
dhclient[13502]: bound to -- renewal in 1780 seconds.
netcfg[13450]: DEBUG: Reading NTP servers from DHCP info
netcfg[13450]: DEBUG: Read NTP server
netcfg[13450]: DEBUG: Read NTP server
netcfg[13450]: DEBUG: Read NTP server
netcfg[13450]: DEBUG: Read NTP server
netcfg[13450]: DEBUG: Reading nameservers from /etc/resolv.conf
netcfg[13450]: DEBUG: Read nameserver
netcfg[13450]: DEBUG: Read nameserver
netcfg[13450]: DEBUG: Read nameserver
netcfg[13450]: DEBUG: State is now 1
netcfg[13450]: DEBUG: State is now 2
netcfg[13450]: DEBUG: State is now 5
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:212:200::123:1b" (or if preseeded, blindly proceeds with the installed system's hostname set to that IPv6 address).
diff -Naur netcfg-1.141.orig/autoconfig.c netcfg-1.141/autoconfig.c
--- netcfg-1.141.orig/autoconfig.c      2012-10-02 02:02:23.000000000 +0100
+++ netcfg-1.141/autoconfig.c   2017-05-16 15:33:55.284092137 +0100
@@ -347,7 +347,7 @@
                } else if (!strncmp("NTP server[", l, 11) && ntp_idx < NETCFG_NTPSERVERS_MAX) {
                        p = strstr(l, "] ") + 2;
-                       strncpy(interface->ntp_servers[ns_idx++], p, sizeof(interface->ntp_servers[ntp_idx]));
+                       strncpy(interface->ntp_servers[ntp_idx], p, sizeof(interface->ntp_servers[ntp_idx]));
                } else if (!strncmp("Domain search list[0] ", l, 21)) {
                        p = strstr(l, "] ") + 2;

--- End Message ---
--- Begin Message ---
Source: netcfg
Source-Version: 1.142

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

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

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

Debian distribution maintenance software
Cyril Brulebois <kibi@debian.org> (supplier of updated netcfg 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)

Hash: SHA256

Format: 1.8
Date: Wed, 17 May 2017 00:06:51 +0200
Source: netcfg
Binary: netcfg netcfg-static
Architecture: source
Version: 1.142
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Cyril Brulebois <kibi@debian.org>
 netcfg     - Configure the network (udeb)
 netcfg-static - Configure a static network (udeb)
Closes: 862745
 netcfg (1.142) unstable; urgency=medium
   * IPv6 autoconfiguration: fix NTP server name handling, which would be
     stored as the DHCP-provided hostname, with many thanks to Malcolm
     Scott for the bug report and the patch (Closes: #862745).
 801ee4a26b425c9e35d3ec14497b49f104edf983 1893 netcfg_1.142.dsc
 b5c900049aaebce23b935245850a13afb43e433a 392392 netcfg_1.142.tar.xz
 04a3b1e2ff3833b5df6097ed0c5cdaa2ab01672cb0bf61d8d3aee5a167891d64 1893 netcfg_1.142.dsc
 263d41bd4f0b4c891f06fb83b0598f846a14a06d628c58f5fc51acaf13c4da6b 392392 netcfg_1.142.tar.xz
 5a3e9fc3c8d903fb586e6d02c3b848d9 1893 debian-installer optional netcfg_1.142.dsc
 c8d8dd7c0b584c141c8d36e8c39ee47e 392392 debian-installer optional netcfg_1.142.tar.xz

Version: GnuPG v1


--- End Message ---

Reply to: