Running my test program I find that the new eglibc returns status -2 where the old one returned -11.
New situation: As with Debian 7.0 with libc6 2.17-7, with the default nsswitch.conf, the returned status / errno is now -2 / 2 (EAI_NONAME / ENOENT) if no nameserver can be reached or the name does not exist. As before, shortening the value of "hosts:" in nsswitch.conf to just "dns" changes errno from 2 to 111 (ECONNREFUSED) when resolv.conf is empty, 110 (ETIMEDOUT) where the indicated external nameserver can't be reached and 101 (ENETUNREACH) where the external nameserver says that name does not exist... although note that errno isn't supposed to be significant for any return status except -11 (EAI_SYSTEM); returned status / errno is always -3 / 11 (EAI_AGAIN / EAGAIN) if the external interface is deconfigured, even if /etc/resolv.conf is empty — which surprizes me a bit. Here is the program output for the indicated values of "hosts:" in /etc/nsswitch.conf. If you compare these results with earlier results I posted, note that I changed the order of the tests in the program. # # With "hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4" # ./a.out Making resolv.conf empty Results of looking up www.google.com: status = -2, errno = 2 Results of looking up a bogus name: status = -2, errno = 2 Writing incorrect nameserver option to resolv.conf Results of looking up www.google.com: status = -2, errno = 2 Results of looking up a bogus name: status = -2, errno = 2 Making resolv.conf empty Results of looking up www.google.com: status = -2, errno = 2 Results of looking up a bogus name: status = -2, errno = 2 Writing correct nameserver option to resolv.conf Results of looking up www.google.com: status = 0, errno = 101 Results of looking up a bogus name: status = -2, errno = 2 # # With "hosts: dns" # ./a.out Making resolv.conf empty Results of looking up www.google.com: status = -2, errno = 111 Results of looking up a bogus name: status = -2, errno = 111 Writing incorrect nameserver option to resolv.conf Results of looking up www.google.com: status = -2, errno = 110 Results of looking up a bogus name: status = -2, errno = 110 Making resolv.conf empty Results of looking up www.google.com: status = -2, errno = 111 Results of looking up a bogus name: status = -2, errno = 111 Writing correct nameserver option to resolv.conf Results of looking up www.google.com: status = 0, errno = 101 Results of looking up a bogus name: status = -2, errno = 101 # # After taking down the external network interface # ./a.out Making resolv.conf empty Results of looking up www.google.com: status = -3, errno = 11 Results of looking up a bogus name: status = -3, errno = 11 Writing incorrect nameserver option to resolv.conf Results of looking up www.google.com: status = -3, errno = 11 Results of looking up a bogus name: status = -3, errno = 11 Making resolv.conf empty Results of looking up www.google.com: status = -3, errno = 11 Results of looking up a bogus name: status = -3, errno = 11 Writing correct nameserver option to resolv.conf Results of looking up www.google.com: status = -3, errno = 11 Results of looking up a bogus name: status = -3, errno = 11 # dpkg -l libc6:amd64 | grep ^ii ii libc6:amd64 2.17-7ubuntu1 ** Attachment added: "getaddrinfo() test program" https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1154599/+attachment/3754121/+files/x.c -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1154599 Title: getaddrinfo() returns -11 (EAI_SYSTEM) instead of -2 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1154599/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
