Debian Bug report logs -
#818611
netcfg: Misleading error message when parsing line with trailing blank
Reported by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Date: Fri, 18 Mar 2016 16:45:01 UTC
Severity: normal
Tags: d-i, patch
Found in version netcfg/1.137
Fixed in version netcfg/1.138
Done: Christian Perrier <bubulle@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, brueckner@linux.vnet.ibm.com, mihajlov@linux.vnet.ibm.com, kate@de.ibm.com, diehl@de.ibm.com, pkern@debian.org, dimitri.ledkov@canonical.com, thorsten.winkler@linux.vnet.ibm.com, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#818611; Package netcfg.
(Fri, 18 Mar 2016 16:45:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Hendrik Brueckner <brueckner@linux.vnet.ibm.com>:
New Bug report received and forwarded. Copy sent to brueckner@linux.vnet.ibm.com, mihajlov@linux.vnet.ibm.com, kate@de.ibm.com, diehl@de.ibm.com, pkern@debian.org, dimitri.ledkov@canonical.com, thorsten.winkler@linux.vnet.ibm.com, Debian Install System Team <debian-boot@lists.debian.org>.
(Fri, 18 Mar 2016 16:45:05 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Package: netcfg
Version: 1.137
Severity: normal
Tags: d-i
Dear maintainer(s),
when specifying IP addresses with leading or trailing blanks, netcfg does not
correctly identify the IP address and fails. For example,
Configure a network using static addressing
-------------------------------------------
The IP address is unique to your computer and may be:
* four numbers separated by periods (IPv4);
* blocks of hexadecimal characters separated by colons (IPv6).
You can also optionally append a CIDR netmask (such as "/24").
If you don't know what to use here, consult your network administrator.
IP address:
Prompt: '?' for help> 9.152.162.103
9.152.162.103
!! ERROR: Malformed IP address
The IP address you provided is malformed. It should be in the form x.x.x.x
where each 'x' is no larger than 255 (an IPv4 address), or a sequence of blocks
of hexadecimal digits separated by colons (an IPv6 address). Please try again.
Press enter to continue
This can easily happen, especially, when entering IP addresses within
command line console, such as the z/VM console on z Systems (s390x).
The expected behavior is that leading and trailing blanks should be ignored.
Note that the root cause of the error condition above is triggered by a
failing inet_pton() call which does not expect blanks for an IP address
string.
To correct this behavior, I have attached two patches for discussion:
The first patch removes trailing blanks for the case above. Note that there
is already an rtrim() function that has been reused. Also an additional
function, strtrim(), is introduced to remove any leading blanks.
The "make test" has been enhanced to verify this behavior.
The second patch removes leading and trailing blanks on IP addresses entered
for other network configurations, for example, point-to-point.
Feedback is welcome.
Thanks and kind regards,
Hendrik
--
Hendrik Brueckner
brueckner@linux.vnet.ibm.com | IBM Deutschland Research & Development GmbH
Linux on z Systems Development | Schoenaicher Str. 220, 71032 Boeblingen
[0001-common-ipaddr-remove-leading-and-trailing-whitespace.patch (text/plain, attachment)]
[0002-static-trim-user-specified-values-for-IP-and-other-a.patch (text/plain, attachment)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#818611; Package netcfg.
(Fri, 18 Mar 2016 16:51:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Hendrik Brueckner <brueckner@linux.vnet.ibm.com>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>.
(Fri, 18 Mar 2016 16:51:04 GMT) (full text, mbox, link).
Message #10 received at submit@bugs.debian.org (full text, mbox, reply):
Control: tags -1 + patch
Added tag(s) patch.
Request was from Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
to submit@bugs.debian.org.
(Fri, 18 Mar 2016 16:51:04 GMT) (full text, mbox, link).
Added tag(s) pending.
Request was from Dimitri John Ledkov <xnox@ubuntu.com>
to control@bugs.debian.org.
(Wed, 30 Mar 2016 14:12:03 GMT) (full text, mbox, link).
Reply sent
to Christian Perrier <bubulle@debian.org>:
You have taken responsibility.
(Sat, 02 Apr 2016 06:39:08 GMT) (full text, mbox, link).
Notification sent
to Hendrik Brueckner <brueckner@linux.vnet.ibm.com>:
Bug acknowledged by developer.
(Sat, 02 Apr 2016 06:39:08 GMT) (full text, mbox, link).
Message #19 received at 818611-close@bugs.debian.org (full text, mbox, reply):
Source: netcfg
Source-Version: 1.138
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 818611@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Christian Perrier <bubulle@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: Sat, 02 Apr 2016 08:06:37 +0200
Source: netcfg
Binary: netcfg netcfg-static
Architecture: source i386
Version: 1.138
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Christian Perrier <bubulle@debian.org>
Description:
netcfg - Configure the network (udeb)
netcfg-static - Configure a static network (udeb)
Closes: 818611
Changes:
netcfg (1.138) unstable; urgency=medium
.
[ Hendrik Brueckner ]
* common/ipaddr: remove leading and trailing whitespaces
* static: trim user-specified values for IP and other addresses
* Closes: #818611, LP: #1541955
.
[ Dimitri John Ledkov ]
* dhcp.c: check return result of two more fgets calls
* nm-conf.c: check return result of fscanf
* Makefile: link with -lm to resolve undefined log and other functions
* All of above resolves FTBFS
Checksums-Sha1:
777673aad426fce98d323b5777bcc3203e87fb64 1893 netcfg_1.138.dsc
76a60d6c73e0fba45043456dc27ccb00fb70c898 392924 netcfg_1.138.tar.xz
5a97b3b6c636e9c745d1c7d637b893aead533546 353392 netcfg-static_1.138_i386.udeb
e3081057328c3d3e07012cfad9148f94473281bb 448040 netcfg_1.138_i386.udeb
Checksums-Sha256:
afd87910c6c3c7e96ddafb7f4d93b17e9674f154381ad0055683835fe710e10e 1893 netcfg_1.138.dsc
ea298072ff3d5e4814bdc750a4e44da61c5c719eab3501c92d073c44cc27289a 392924 netcfg_1.138.tar.xz
723154038093b8724ca98bbdc2ca703e75994bb5afdcbe0259483756a36e714d 353392 netcfg-static_1.138_i386.udeb
4c70d020e1318094b6932f9dbf4d458d40f88499f73b7697343b323e3d4b0d5e 448040 netcfg_1.138_i386.udeb
Files:
c0955f31ea8cb2e8f8e47638f01bcc89 1893 debian-installer optional netcfg_1.138.dsc
aa618d87b92f8bce19509e94d2d00e27 392924 debian-installer optional netcfg_1.138.tar.xz
050bbe6c0ce9371b48ee68c9981562d2 353392 debian-installer optional netcfg-static_1.138_i386.udeb
991ae52d9efed99f81c693fc85b7ce06 448040 debian-installer optional netcfg_1.138_i386.udeb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCAAGBQJW/2STAAoJEIcvcCxNbiWodcgQAK3DaBczmoPN27T0uEz+K9R6
8sb2ATB1JGPSII59vSziKXAu++U2Zd6a87XKy2k4Cr3iT4CKw/1ks5MhCViNDg4U
zCnyK7uv95AzuHtOPSvcwQyrO0VrFu10GBGxPXmoJEHS4UmajPoO39B94YVG/k0S
N6Kw00S7me02P9QF4RPDxCv43fxnzm//LrADUTJp1Ipbd6mJQ6M8wVD4LBrSppni
nrk35OcEU6oaNl+IJSJHYdCoIEmLulPlIwu1F6+dIT+dPy8HoWYkAcaqwHiuqApp
mVW8CVEgfAsAvotCP6RRNBT90qh5u1Up+XXBed7NrOsvDC0z/9L+2mJ3Ozvvn5bK
pif6CiV6CQR62WumNxkGiGgmYDYIvnQL8SjjM85Bz+piS+Pvc3pfuCxYfj++uKHC
CLgVe4Ch0tLCh+Y9ha4IWJFGEN/Ve6WZoJRWPcU5qv3wjjaaB6ByMRk9V+AAIe9b
92+/qcOp4GT5WqHe0xKLkzpabxjEBpLK+UYeh3Df1vtCHdricE3au3qVdtiy4l/b
uGRpOKlqn9fzTZziWmSBedUW0iAiJO0oqOuW25SsS0E6DajNSbT+wPGU0bjt3tqV
ZHVt1hWwcZEmXxjDzX63hc9WoOtLFJMozG4qtW/dYWcOA3OvvOAKIThA7O14Oo/z
QMVJjBi8X0zRTr3thC8X
=tcfT
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Fri, 06 May 2016 07:26:15 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Thu Aug 8 03:03:47 2024;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.