This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/14990] getaddrinfo with servname=NULL returns duplicate addresses
- From: "psimerda at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 11 Jan 2013 15:28:40 +0000
- Subject: [Bug network/14990] getaddrinfo with servname=NULL returns duplicate addresses
- Auto-submitted: auto-generated
- References: <bug-14990-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=14990
--- Comment #1 from Pavel Åimerda <psimerda at redhat dot com> 2013-01-11 15:28:40 UTC ---
(In reply to comment #0)
> If servname is null, the call shall return network-level addresses for the
> specified nodename.
As a side effect, using socktype and/or protocol when servname=NULL has no
chance to return useful information. These values are there only to supplement
the service option.
But that means SOCK_RAW can be ignored entirely in getaddrinfo().
The only questions is, what should getaddrinfo return when servname is NULL but
socktype and/or protocol is non-zero. There are a couple of options:
1) Fail. This might have impact on existing software.
2) Return zero socktype and zero protocol. This might have impact on existing
software.
3) Return the supplied socktype and protocol.
a) Without checking.
b) With a validity check.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.