From cc8c150f76b3ae3efa74335875e50cfdc3630bc8742cf105bae048f2fa10835d Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 7 May 2014 15:06:20 +0000 Subject: [PATCH] Accepting request 232954 from home:Andreas_Schwab:Factory - getaddrinfo-uninit-result.patch: fix parsing of getai result for IPv6-only request (bnc#876521) OBS-URL: https://build.opensuse.org/request/show/232954 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=364 --- getaddrinfo-uninit-result.patch | 18 +++++++++++------- glibc-testsuite.changes | 6 ++++++ glibc-utils.changes | 6 ++++++ glibc.changes | 6 ++++++ 4 files changed, 29 insertions(+), 7 deletions(-) diff --git a/getaddrinfo-uninit-result.patch b/getaddrinfo-uninit-result.patch index 99a5bbc..06887a3 100644 --- a/getaddrinfo-uninit-result.patch +++ b/getaddrinfo-uninit-result.patch @@ -5,18 +5,22 @@ Index: glibc-2.19/sysdeps/posix/getaddrinfo.c =================================================================== --- glibc-2.19.orig/sysdeps/posix/getaddrinfo.c +++ glibc-2.19/sysdeps/posix/getaddrinfo.c -@@ -710,6 +710,14 @@ gaih_inet (const char *name, const struc - struct gaih_addrtuple *addrfree = addrmem; - for (int i = 0; i < air->naddrs; ++i) +@@ -712,6 +712,18 @@ gaih_inet (const char *name, const struc { + socklen_t size = (air->family[i] == AF_INET + ? INADDRSZ : IN6ADDRSZ); ++ + if (!((air->family[i] == AF_INET + && req->ai_family == AF_INET6 + && (req->ai_flags & AI_V4MAPPED) != 0) + || req->ai_family == AF_UNSPEC + || air->family[i] == req->ai_family)) -+ /* Skip over non-matching result. */ -+ continue; ++ { ++ /* Skip over non-matching result. */ ++ addrs += size; ++ continue; ++ } + - socklen_t size = (air->family[i] == AF_INET - ? INADDRSZ : IN6ADDRSZ); if (*pat == NULL) + { + *pat = addrfree++; diff --git a/glibc-testsuite.changes b/glibc-testsuite.changes index 8292fd9..846e111 100644 --- a/glibc-testsuite.changes +++ b/glibc-testsuite.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed May 7 10:13:24 UTC 2014 - schwab@suse.de + +- getaddrinfo-uninit-result.patch: fix parsing of getai result for + IPv6-only request (bnc#876521) + ------------------------------------------------------------------- Thu Apr 17 09:13:32 UTC 2014 - schwab@suse.de diff --git a/glibc-utils.changes b/glibc-utils.changes index 8292fd9..846e111 100644 --- a/glibc-utils.changes +++ b/glibc-utils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed May 7 10:13:24 UTC 2014 - schwab@suse.de + +- getaddrinfo-uninit-result.patch: fix parsing of getai result for + IPv6-only request (bnc#876521) + ------------------------------------------------------------------- Thu Apr 17 09:13:32 UTC 2014 - schwab@suse.de diff --git a/glibc.changes b/glibc.changes index 8292fd9..846e111 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed May 7 10:13:24 UTC 2014 - schwab@suse.de + +- getaddrinfo-uninit-result.patch: fix parsing of getai result for + IPv6-only request (bnc#876521) + ------------------------------------------------------------------- Thu Apr 17 09:13:32 UTC 2014 - schwab@suse.de