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)
+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]
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) \
nip = nip->next;
}
- _res.options = old_res_options;
+ _res.options |= old_res_options & RES_USE_INET6;
if (no_data != 0 && no_inet6_data != 0)
{