summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--sysdeps/posix/getaddrinfo.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index da762ca3a6..2e9a516342 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-05-29 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #12350]
+ * sysdeps/posix/getaddrinfo.c (gethosts): Restore only RES_USE_IENT6
+ bit from old_res_options.
+ (gaih_inet): Likewise.
+
2011-05-28 Ulrich Drepper <drepper@gmail.com>
[BZ #12811]
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 0217cc6fd3..923d6c84ba 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -207,7 +207,7 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp,
if (herrno == NETDB_INTERNAL) \
{ \
__set_h_errno (herrno); \
- _res.options = old_res_options; \
+ _res.options |= old_res_options & RES_USE_INET6; \
return -EAI_SYSTEM; \
} \
if (herrno == TRY_AGAIN) \
@@ -842,7 +842,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
nip = nip->next;
}
- _res.options = old_res_options;
+ _res.options |= old_res_options & RES_USE_INET6;
if (no_data != 0 && no_inet6_data != 0)
{