From 8db2cf163e048b02cbafe118bf033b78618c2f30 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 10 May 2016 10:09:24 +0200 Subject: getaddrinfo: Restore RES_USE_INET6 flag on error path [BZ #19994] --- ChangeLog | 6 ++++++ sysdeps/posix/getaddrinfo.c | 1 + 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 88c2b5dc7d..7131a286f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-05-10 Florian Weimer + + [BZ #19994] + * sysdeps/posix/getaddrinfo.c (gethosts): Restore RES_USE_INET6 + flag in _res.options. + 2016-05-09 Joseph Myers * conform/data/sys/types.h-data (blkcnt_t): Do not expect for diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index fed2d3bf13..c670a984b2 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -240,6 +240,7 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, 2 * tmpbuflen); \ if (newp == NULL) \ { \ + _res.options |= old_res_options & RES_USE_INET6; \ result = -EAI_MEMORY; \ goto free_and_return; \ } \ -- cgit 1.4.1