This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH COMMITTED] getaddrinfo: Restore RES_USE_INET6 flag on error path [BZ #19994]


2016-05-10  Florian Weimer  <fweimer@redhat.com>

	[BZ #19994]
	* sysdeps/posix/getaddrinfo.c (gethosts): Restore RES_USE_INET6
	flag in _res.options.

diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index fed2d3b..c670a98 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;					      \
 	  }								      \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]