Debian Bug report logs - #482987
manpages-dev: inet_pton doesn't extend inet_addr

version graph

Package: manpages-dev; Maintainer for manpages-dev is Martin Schulze <joey@debian.org>; Source for manpages-dev is src:manpages.

Reported by: Stephane Chazelas <stephane_chazelas@yahoo.fr>

Date: Mon, 26 May 2008 11:12:01 UTC

Severity: normal

Tags: fixed-upstream

Found in version manpages/2.79-4

Fixed in version manpages/3.01-1

Done: Joey Schulze <joey@infodrom.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#482987; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to Stephane Chazelas <stephane_chazelas@yahoo.fr>:
New Bug report received and forwarded. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Stephane Chazelas <stephane_chazelas@yahoo.fr>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: manpages-dev: inet_pton doesn't extend inet_addr
Date: Mon, 26 May 2008 12:11:05 +0100
Package: manpages-dev
Version: 2.79-4
Severity: normal


Hiya,

the manpage of inet_pton(3) says:

       inet_pton() extends the inet_addr(3) function to support
       multiple address families, inet_addr(3) is now considered
       to be deprecated in favor of inet_pton().  The follow-
       ing address families are currently supported:

"extends" suggests that inet_pton is a superset of inet_addr.
That is not true as inet_pton doesn't recognise the same IPv4
address notations as inet_addr. An application that would switch
from using inet_addr to using inet_pton would break *its*
backward compatibility.

For instance, if ping was changed from using inet_aton to using
inet_pton, scripts that do "ping 10.1" would start to fail.

The inet_pton(3) man page also says:

	Certain legacy hex and octal formats of AF_INET
	addresses are not supported by inet_pton(), which
	rejects them.

Not only that, it also doesn't recognise the non-quad decimal
ones (such as 127.1 which is the usual notation for class A
addresses such as the loopback ones).

Among all the string-to-address conversion functions (inet_addr,
inet_aton, gethostbyname, getaddrinfo...), inet_pton is the only
one that only recognises the quad-decimal ones. I'm not sure we
can say the other ones are /legacy/).

Also note that POSIX/SUSv3 didn't obsolete inet_addr() (though
it did obsolete gethostbyname() for instance).

I think adding getaddrinfo() to the SEE ALSO section would make
sense, as getaddrinfo() does extend inet_addr() (see the
AI_NUMERICHOST flag). I'd be even tempted to say that
getaddrinfo() should be used instead of inet_pton() when
backward compatibility is desirable.

See also bugs manpages-dev#482979 and libc6#482973

Best regards,
Stephane

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.25-rc8 (PREEMPT)
Locale: LANG=en_GB.ISO-8859-15, LC_CTYPE=en_US.ISO-8859-15 (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash

Versions of packages manpages-dev depends on:
ii  manpages                      2.79-4     Manual pages about using a GNU/Lin

manpages-dev recommends no packages.

-- debconf-show failed




Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#482987; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to "Michael Kerrisk" <mtk.manpages@googlemail.com>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #10 received at 482987@bugs.debian.org (full text, mbox):

From: "Michael Kerrisk" <mtk.manpages@googlemail.com>
To: "Stephane Chazelas" <stephane_chazelas@yahoo.fr>, 482987@bugs.debian.org
Cc: control@bugs.debian.org
Subject: Re: Bug#482987: manpages-dev: inet_pton doesn't extend inet_addr
Date: Tue, 27 May 2008 12:29:20 +0200
tags 482987 fixed-upstream
thanks

Hi Stephane,

Thanks for another good bug report!

On Mon, May 26, 2008 at 1:11 PM, Stephane Chazelas
<stephane_chazelas@yahoo.fr> wrote:
> Package: manpages-dev
> Version: 2.79-4
> Severity: normal
>
>
> Hiya,
>
> the manpage of inet_pton(3) says:
>
>       inet_pton() extends the inet_addr(3) function to support
>       multiple address families, inet_addr(3) is now considered
>       to be deprecated in favor of inet_pton().  The follow-
>       ing address families are currently supported:
>
> "extends" suggests that inet_pton is a superset of inet_addr.
> That is not true as inet_pton doesn't recognise the same IPv4
> address notations as inet_addr. An application that would switch
> from using inet_addr to using inet_pton would break *its*
> backward compatibility.

Agreed.  I have removed this sentence.

> For instance, if ping was changed from using inet_aton to using
> inet_pton, scripts that do "ping 10.1" would start to fail.

Yes.

> The inet_pton(3) man page also says:
>
>        Certain legacy hex and octal formats of AF_INET
>        addresses are not supported by inet_pton(), which
>        rejects them.
>
> Not only that, it also doesn't recognise the non-quad decimal
> ones (such as 127.1 which is the usual notation for class A
> addresses such as the loopback ones).

Yes, I've clarified this in the page.

> Among all the string-to-address conversion functions (inet_addr,
> inet_aton, gethostbyname, getaddrinfo...), inet_pton is the only
> one that only recognises the quad-decimal ones. I'm not sure we
> can say the other ones are /legacy/).

Agreed.

> Also note that POSIX/SUSv3 didn't obsolete inet_addr() (though
> it did obsolete gethostbyname() for instance).

Yes.

> I think adding getaddrinfo() to the SEE ALSO section would make
> sense, as getaddrinfo() does extend inet_addr() (see the
> AI_NUMERICHOST flag).

Yes, I will do this.

> I'd be even tempted to say that
> getaddrinfo() should be used instead of inet_pton() when
> backward compatibility is desirable.

Good call!  Yes, I will add some words saying that if we want an
interface that supports IPv4 and IPv6, and IPv4 numbers-and-dots
notation, then see getaddrinfo(3).

> See also bugs manpages-dev#482979 and libc6#482973

Thanks for the pointer to that last bug.  I will update the
gethostbyname(3) man page accordingly, and track the bug.

You'll get an email when the changes to the inet_pton.3 page are released.

Cheers,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html




Tags added: fixed-upstream Request was from "Michael Kerrisk" <mtk.manpages@googlemail.com> to control@bugs.debian.org. (Tue, 27 May 2008 10:33:04 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#482987; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to Stephane Chazelas <Stephane_Chazelas@yahoo.fr>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #17 received at 482987@bugs.debian.org (full text, mbox):

From: Stephane Chazelas <Stephane_Chazelas@yahoo.fr>
To: Michael Kerrisk <mtk.manpages@googlemail.com>
Cc: 482987@bugs.debian.org
Subject: Re: Bug#482987: manpages-dev: inet_pton doesn't extend inet_addr
Date: Tue, 27 May 2008 15:53:51 +0100
On Tue, May 27, 2008 at 12:29:20PM +0200, Michael Kerrisk wrote:
> tags 482987 fixed-upstream
[...]

Hi Michael,

thanks for your replies. I agree with all your comments on both
(inet_pton and inet_aton) "bugs" :)

Best regards,
St├ęphane




Reply sent to Joey Schulze <joey@infodrom.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Stephane Chazelas <stephane_chazelas@yahoo.fr>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #22 received at 482987-close@bugs.debian.org (full text, mbox):

From: Joey Schulze <joey@infodrom.org>
To: 482987-close@bugs.debian.org
Subject: Bug#482987: fixed in manpages 3.01-1
Date: Fri, 27 Jun 2008 13:32:04 +0000
Source: manpages
Source-Version: 3.01-1

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

manpages-dev_3.01-1_all.deb
  to pool/main/m/manpages/manpages-dev_3.01-1_all.deb
manpages_3.01-1.diff.gz
  to pool/main/m/manpages/manpages_3.01-1.diff.gz
manpages_3.01-1.dsc
  to pool/main/m/manpages/manpages_3.01-1.dsc
manpages_3.01-1_all.deb
  to pool/main/m/manpages/manpages_3.01-1_all.deb
manpages_3.01.orig.tar.gz
  to pool/main/m/manpages/manpages_3.01.orig.tar.gz



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 482987@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joey Schulze <joey@infodrom.org> (supplier of updated manpages 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@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Fri, 27 Jun 2008 15:11:49 +0200
Source: manpages
Binary: manpages manpages-dev
Architecture: source all
Version: 3.01-1
Distribution: unstable
Urgency: low
Maintainer: Martin Schulze <joey@debian.org>
Changed-By: Joey Schulze <joey@infodrom.org>
Description: 
 manpages   - Manual pages about using a GNU/Linux system
 manpages-dev - Manual pages about using GNU/Linux for development
Closes: 482979 482987 485636 486920 487254
Changes: 
 manpages (3.01-1) unstable; urgency=low
 .
   * New upstream version
     . inet_aton() is *not* in POSIX.1 (closes: Bug#482979)
     . Improvements to inet_pton() (closes: Bug#482987)
     . Improvements to nanosleep(2) (closes: Bug#485636)
     . Added errors section for scanf(3) (closes: Bug#487254)
     . Document guest time in proc(5) (closes: Bug#486920)
Checksums-Sha1: 
 1605e0806dc4854d3379150ffbb4e9b0eeed5d40 964 manpages_3.01-1.dsc
 cfd01d341b259d44f8391789457d52e38bc8d327 1348851 manpages_3.01.orig.tar.gz
 22fc4b999ed541f1a17373b152680cb362ecaa8c 46423 manpages_3.01-1.diff.gz
 a6379d90da5015dff07767be4223f9699c5d2610 577032 manpages_3.01-1_all.deb
 feb3784e22d92755113345b12d4c786c03a74a2e 1403326 manpages-dev_3.01-1_all.deb
Checksums-Sha256: 
 a7829005f845c3a710d597bbc5d46987f6109d1d50481ed0a27f1892442e2735 964 manpages_3.01-1.dsc
 04ff9d05a43c5820a1127efba6caf06a6ba9bd9a98c18cd93f38ff3446c7c236 1348851 manpages_3.01.orig.tar.gz
 c3352a5cb9c80f0fdf88fb29c3011397177186d45b856eb8cc0341b8fc2ac156 46423 manpages_3.01-1.diff.gz
 8104d0c7bde81f81d52a85ba20bec58f2d58ae108fb8f37f4cdebdf2811ba1e7 577032 manpages_3.01-1_all.deb
 e7da5ca23627565dce0fb8c77ea3f248408f8b9bf4d83d67f626e94f9cb0d0e8 1403326 manpages-dev_3.01-1_all.deb
Files: 
 0ce201ebec8b8d10bc745683d6a525fc 964 doc important manpages_3.01-1.dsc
 5afc311cf7b96d08e17af30f566b1887 1348851 doc important manpages_3.01.orig.tar.gz
 f2d94a71cc35c7dc99d0cd48d63480d4 46423 doc important manpages_3.01-1.diff.gz
 1d8ffc83c891573da6bcbc04a5043982 577032 doc important manpages_3.01-1_all.deb
 68a2acbedea8fde5d3e4bedb06a6aaa6 1403326 doc optional manpages-dev_3.01-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFIZOfHW5ql+IAeqTIRAnIJAJ9liGLBOO9JmDmBuWCRH6Acgi0ThQCfe4AO
VpHRgibtbO0kTIl+qz19MDU=
=EyFw
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 07 Aug 2008 07:34:25 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 00:42:08 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.