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] New: getaddrinfo() error codes


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

            Bug ID: 15726
           Summary: getaddrinfo() error codes
           Product: glibc
           Version: 2.17
            Status: NEW
          Severity: normal
          Priority: P2
         Component: network
          Assignee: unassigned at sourceware dot org
          Reporter: kurt at roeckx dot be

There have been many changes in the return values from getaddrinfo() in glibc
to the point I can't rely on the return values to mean anything.

As far as I know the standard for this is rfc3493 (also known as 2553bis).

I'm going to quote those that I'm having a problem with as glibc now returns:
   [EAI_AGAIN]     The name could not be resolved at this time.  Future
                   attempts may succeed.
   [EAI_FAIL]      A non-recoverable error occurred when attempting to
                   resolve the name.
   [EAI_NONAME]    The name does not resolve for the supplied
                   parameters.  Neither nodename nor servname were
                   supplied.  At least one of these must be supplied.

And from the manpage:
      EAI_AGAIN
              The name server returned a temporary failure indication.  Try
again later.
      EAI_FAIL
              The name server returned a permanent failure indication.
      EAI_NONAME
              The  node  or service is not known; or both node and service are
NULL; or AI_NUMERICSERV was specified in hints.ai_flags and service was not a
numeric port-number string.


What I expect:
- Things work as expected: return 0
- The nameserver replies that the hostname does not exist: EAI_FAIL
- The nameserver doesn't reply, or replies with a temporary failure: EAI_AGAIN
- You used AI_NUMERICHOST or AI_NUMERICSERV and didn't give a number:
EAI_NONAME

What I think the current situation is:
- Things work as expected: return 0
- The nameserver replies that the hostname does not exist: EAI_NONAME
- The nameserver doesn't reply: EAI_NONAME
- The nameserver replies with a temporary failure: EAI_NONAME


Kurt

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