This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug network/14990] getaddrinfo with servname=NULL returns duplicate addresses


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]