[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
immediately.)


-- 
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 255.255.255.255 port 67 interval 1 (xid=0xce07ab1b)
dhclient[13502]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 1 (xid=0xce07ab1b)
dhclient[13502]: DHCPREQUEST of 128.232.81.81 on eth0 to 255.255.255.255 port 67 (xid=0x1bab07ce)
dhclient[13502]: DHCPOFFER of 128.232.81.81 from 128.232.80.7
dhclient[13502]: DHCPACK of 128.232.81.81 from 128.232.80.7
dhclient[13502]: bound to 128.232.81.81 -- renewal in 1780 seconds.
netcfg[13450]: DEBUG: Reading NTP servers from DHCP info
netcfg[13450]: DEBUG: Read NTP server 128.232.0.9
netcfg[13450]: DEBUG: Read NTP server 128.232.0.8
netcfg[13450]: DEBUG: Read NTP server 128.232.0.7
netcfg[13450]: DEBUG: Read NTP server 128.232.96.152
netcfg[13450]: DEBUG: Reading nameservers from /etc/resolv.conf
netcfg[13450]: DEBUG: Read nameserver 128.232.1.1
netcfg[13450]: DEBUG: Read nameserver 128.232.1.2
netcfg[13450]: DEBUG: Read nameserver 128.232.1.3
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 @@
                        ns_idx++;
                } 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]));
                        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
attached.

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
pp.
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)


-----BEGIN PGP SIGNED MESSAGE-----
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>
Description:
 netcfg     - Configure the network (udeb)
 netcfg-static - Configure a static network (udeb)
Closes: 862745
Changes:
 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).
Checksums-Sha1:
 801ee4a26b425c9e35d3ec14497b49f104edf983 1893 netcfg_1.142.dsc
 b5c900049aaebce23b935245850a13afb43e433a 392392 netcfg_1.142.tar.xz
Checksums-Sha256:
 04a3b1e2ff3833b5df6097ed0c5cdaa2ab01672cb0bf61d8d3aee5a167891d64 1893 netcfg_1.142.dsc
 263d41bd4f0b4c891f06fb83b0598f846a14a06d628c58f5fc51acaf13c4da6b 392392 netcfg_1.142.tar.xz
Files:
 5a3e9fc3c8d903fb586e6d02c3b848d9 1893 debian-installer optional netcfg_1.142.dsc
 c8d8dd7c0b584c141c8d36e8c39ee47e 392392 debian-installer optional netcfg_1.142.tar.xz

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

iQIcBAEBCAAGBQJZG3hQAAoJEP+RSvDCs1UgU2YP/icB6/lzDjbzBrSwHhw53kVd
rNm9IJOtSPJcJCDc+VTrOasdZSJQrV8c35fTcT9l3ASLaA+G+Y5QRf1xhlFrgkXN
QyKTvLIAicZUfImI4FqV5sIq6lXVGxFvLq3jVGs0nIDmhxVrpB7SGlmI7upCog91
dcrHs8ZPRKL9T8sPs1offWfzi3CGz69RLnNW/GB926+8E8wvdkAKuCtwc4r/Wvbf
9dePrQ5rn06vW1xHFR9y/V7TGmbS+n4zDzHIW6HdmpkxNdlukfeFeHU3Rv0ni97Y
f5Tn2qDYRgYMdvtBYbpyIs6k79Ya+n+g7mrOFo6VwXZLCdMbtUFGAyT0bM3cs7k5
UGgoihSQy9DJZPofMZiwecs1tbSK1/YbsSmrY1DL/wc/k2s2QFXqVhNUvrofOsL7
rjnU35W+dVOd2BryZ+hB7g2LEPY0y4KgVp+G5HCxt+IEDWPLNAAXogr0ZQJaNW6i
KjANpjsFkUM6A7jI3wBj/Nz6GYD96YUUIedHvuDj8hPxVIFLxl0iY5xs2YlxcJLF
GC5C3+u9E6frnAFPwYWtlD6cv7fSAL0pslTYuH1Ak56iZZhk2y8fz5nB1n17jn9p
sOBq7G2aO1dmbgyo+KJojPJP8R2eSsEXwh2H+xVc1YXfnhrgm9DNTRVGiybUK/Ez
uEI1xqjKoa8+JIQ3N/Ew
=IJOY
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: