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/15726] getaddrinfo() returns incorrect status


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

--- Comment #6 from Thomas Hood <jdthood at gmail dot com> ---
Kurt's interpretation appears prima facie to be correct. The definition of
EAI_NONAME is:

    The name does not resolve for the supplied parameters.
    Neither nodename nor servname were supplied. At least
    one of these must be supplied.

I.e., getaddrinfo() was called with invalid arguments, period.

But this is not how the RFC is being interpreted.

OpenBSD
-------
The code returns EAI_NONAME in two cases. First:
        if (as->as.ai.hostname == NULL &&
            as->as.ai.servname == NULL) {
            ar->ar_gai_errno = EAI_NONAME;
Second:
        [...]
        if (ai->ai_flags & AI_NUMERICHOST) {
            ar->ar_gai_errno = EAI_NONAME;

OpenBSD man page for gai_strerror:

   EAI_NONAME  hostname or servname not provided, or not known

NetBSD
------
NetBSD getaddrinfo() returns EAI_NONAME in two kinds of cases. First:
    if (hostname == NULL && servname == NULL)
        return EAI_NONAME;
Second:
    [...]
    if (pai->ai_flags & AI_NUMERICHOST)
        ERR(EAI_NONAME);

NetBSD man page for getaddrinfo:

     EAI_NONAME  nodename nor servname provided, or not known.

A relevant NetBSD problem report:

   http://gnats.netbsd.org/44915

Solaris
-------
Solaris man page for getaddrinfo():
      EAI_NONAME  Neither nodename nor servname is provided or known.

HPÂTru64 UNIX
-------------
  [EAI_NONAME]
      The node name cannot be resolved with the supplied parameters.
      You did not pass either the nodename or servname parameter.
      You must pass at least one.

bind-users
----------
There's an interesting discussion of this issue on the bind-users mailing list.

   https://lists.isc.org/pipermail/bind-users/2011-April/083701.html

-- 
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]