From 7ae22829afb2b4ca531d1c00437d428f55d59341 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 29 May 2011 23:49:49 -0400 Subject: Restore _res correctly 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. --- sysdeps/posix/getaddrinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sysdeps/posix/getaddrinfo.c') diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index 5ddda889cf..1e017b2ed6 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) \ @@ -1015,7 +1015,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) { -- cgit 1.4.1