diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | sysdeps/posix/getaddrinfo.c | 20 |
2 files changed, 15 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog index 2ba417bb2e..8117882671 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-03-26 Ulrich Drepper <drepper@redhat.com> + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Don't assume success always + means aborting the loop over the NSS methods. + 2010-03-25 Andreas Schwab <schwab@redhat.com> * sysdeps/posix/getaddrinfo.c (gaih_inet): Reset no_data before diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index 8b7e38fdea..597189f744 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -817,17 +817,17 @@ gaih_inet (const char *name, const struct gaih_service *service, canon = name; } } - - break; } - - /* We can have different states for AF_INET and - AF_INET6. Try to find a useful one for both. */ - if (inet6_status == NSS_STATUS_TRYAGAIN) - status = NSS_STATUS_TRYAGAIN; - else if (status == NSS_STATUS_UNAVAIL - && inet6_status != NSS_STATUS_UNAVAIL) - status = inet6_status; + else + { + /* We can have different states for AF_INET and + AF_INET6. Try to find a useful one for both. */ + if (inet6_status == NSS_STATUS_TRYAGAIN) + status = NSS_STATUS_TRYAGAIN; + else if (status == NSS_STATUS_UNAVAIL + && inet6_status != NSS_STATUS_UNAVAIL) + status = inet6_status; + } } else status = NSS_STATUS_UNAVAIL; |