]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/glibc/glibc-rh1022022.patch
Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into vpn-statistic1
[ipfire-2.x.git] / src / patches / glibc / glibc-rh1022022.patch
1 diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
2 index 81e928a..05883bd 100644
3 --- a/sysdeps/posix/getaddrinfo.c
4 +++ b/sysdeps/posix/getaddrinfo.c
5 @@ -832,8 +832,13 @@ gaih_inet (const char *name, const struct gaih_service *service,
6 while (!no_more)
7 {
8 no_data = 0;
9 - nss_gethostbyname4_r fct4
10 - = __nss_lookup_function (nip, "gethostbyname4_r");
11 + nss_gethostbyname4_r fct4 = NULL;
12 +
13 + /* gethostbyname4_r sends out parallel A and AAAA queries and
14 + is thus only suitable for PF_UNSPEC. */
15 + if (req->ai_family == PF_UNSPEC)
16 + fct4 = __nss_lookup_function (nip, "gethostbyname4_r");
17 +
18 if (fct4 != NULL)
19 {
20 int herrno;