All of lore.kernel.org
 help / color / mirror / Atom feed
* gethostbyname(3) / IPv6
@ 2010-03-04  0:14 Ersek, Laszlo
       [not found] ` <Pine.LNX.4.64.1003040102490.6496-a7N6hpt6sEOGMAd2kvhVmjlnRINgEMlm@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Ersek, Laszlo @ 2010-03-04  0:14 UTC (permalink / raw)
  To: Michael Kerrisk / Linux man-pages; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

Hi,

we were having a discussion in the comp.unix.programmer Usenet newsgroup, 
starting with Message-ID: 
<e8e1cb1d-9693-4803-bf29-b4828de384e0-nbjlO0B5Z98wq+9lhVFwFGB/v6IoIuQBVpNB7YpNyf8@public.gmane.org>. 
Consequently, I'd like to report two bugs (in separate e-mails):

(2/2) gethostbyname(3) fails to resolve the IPv6 address "::1", but the 
manual page says: "If name is an IPv4 or IPv6 address, no lookup is 
performed and gethostbyname() simply copies name into the h_name field 
[...]".

Debian bug report:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=455762

glibc bug report:

http://sourceware.org/bugzilla/show_bug.cgi?id=5479

SUSv3 link for gethostbyname(3):

http://www.opengroup.org/onlinepubs/000095399/functions/gethostbyname.html

It seems that the glibc behavior is conformant, and the manual page is in 
error.

I'm using the manpages-dev package, version 3.05-1, under Debian Lenny. 
However, before sending this report, I've verified the bug's existence in 
the online page under

http://www.kernel.org/doc/man-pages/online/pages/man3/gethostbyname.3.html

If this goes anywhere on linux-man@vger, please keep me CC'd.

Thank you very much,
lacos
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gethostbyname(3) / IPv6
       [not found] ` <Pine.LNX.4.64.1003040102490.6496-a7N6hpt6sEOGMAd2kvhVmjlnRINgEMlm@public.gmane.org>
@ 2015-05-11  9:17   ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2015-05-11  9:17 UTC (permalink / raw)
  To: Ersek, Laszlo
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, linux-man-u79uwXL29TY76Z2rM5mHXA

Hello Laszlo,

On 03/04/2010 01:14 AM, Ersek, Laszlo wrote:
> Hi,
> 
> we were having a discussion in the comp.unix.programmer Usenet newsgroup, 
> starting with Message-ID: 
> <e8e1cb1d-9693-4803-bf29-b4828de384e0-nbjlO0B5Z98wq+9lhVFwFGB/v6IoIuQBVpNB7YpNyf8@public.gmane.org>. 
> Consequently, I'd like to report two bugs (in separate e-mails):
> 
> (2/2) gethostbyname(3) fails to resolve the IPv6 address "::1", but the 
> manual page says: "If name is an IPv4 or IPv6 address, no lookup is 
> performed and gethostbyname() simply copies name into the h_name field 
> [...]".
> 
> Debian bug report:
> 
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=455762
> 
> glibc bug report:
> 
> http://sourceware.org/bugzilla/show_bug.cgi?id=5479
> 
> SUSv3 link for gethostbyname(3):
> 
> http://www.opengroup.org/onlinepubs/000095399/functions/gethostbyname.html
> 
> It seems that the glibc behavior is conformant, and the manual page is in 
> error.
> 
> I'm using the manpages-dev package, version 3.05-1, under Debian Lenny. 
> However, before sending this report, I've verified the bug's existence in 
> the online page under
> 
> http://www.kernel.org/doc/man-pages/online/pages/man3/gethostbyname.3.html
> 
> If this goes anywhere on linux-man@vger, please keep me CC'd.

Late follow up. That text about Ipv6 addresses has been in the
man page since the beginning, but it appears that the author
didn't test this point. I verified your test. The appropriate
path seems to remove mention of IPv6 from the man page, which I 
have done with the patch below.

Thanks for the report.

Cheers,

Michael

diff --git a/man3/gethostbyname.3 b/man3/gethostbyname.3
index e0b94b0..d79eb32 100644
--- a/man3/gethostbyname.3
+++ b/man3/gethostbyname.3
@@ -149,13 +149,11 @@ for the given host
 .IR name .
 Here
 .I name
-is either a hostname, or an IPv4 address in standard dot notation (as for
-.BR inet_addr (3)),
-or an IPv6 address in colon (and possibly dot) notation.
-(See RFC\ 1884 for the description of IPv6 addresses.)
+is either a hostname or an IPv4 address in standard dot notation (as for
+.BR inet_addr (3)).
 If
 .I name
-is an IPv4 or IPv6 address, no lookup is performed and
+is an IPv4 address, no lookup is performed and
 .BR gethostbyname ()
 simply copies
 .I name



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-11  9:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-04  0:14 gethostbyname(3) / IPv6 Ersek, Laszlo
     [not found] ` <Pine.LNX.4.64.1003040102490.6496-a7N6hpt6sEOGMAd2kvhVmjlnRINgEMlm@public.gmane.org>
2015-05-11  9:17   ` Michael Kerrisk (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.