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
This commit is contained in:
Andreas Schwab 2014-05-07 15:06:20 +00:00 committed by Git OBS Bridge
parent 96e20a41d7
commit cc8c150f76
4 changed files with 29 additions and 7 deletions

View File

@ -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++;

View File

@ -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

View File

@ -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

View File

@ -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