diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-05-29 23:49:49 -0400 |
---|---|---|
committer | Petr Baudis <pasky@ucw.cz> | 2011-09-03 20:31:09 +0200 |
commit | df79688ef6f6c746ecb4cc2e212780832e2f9c87 (patch) | |
tree | 6f7765c253bb6405b7776b8d793b8115b7a0772e | |
parent | 07c65bd7b3f8aaed2e6e567d4b1a932893e8838a (diff) | |
download | glibc-release/2.11/master.tar.gz |
Restore _res correctlyrelease/2.11/master
getaddrinfo works around the resolver functionality to avoid automatic
IPv6 lookups. The restoring didn't allow for the resolver to set
additional bits in _res.
(cherry picked from commit 7ae22829afb2b4ca531d1c00437d428f55d59341)
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | sysdeps/posix/getaddrinfo.c | 4 |
2 files changed, 9 insertions, 2 deletions
@@ -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) { |