]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/glibc/glibc-rh841787.patch
Merge branch 'master' into fifteen
[people/teissler/ipfire-2.x.git] / src / patches / glibc / glibc-rh841787.patch
1 diff -rup a/resolv/res_init.c b/resolv/res_init.c
2 --- a/resolv/res_init.c 2012-07-26 15:10:45.655638776 -0600
3 +++ b/resolv/res_init.c 2012-07-26 15:11:27.731423002 -0600
4 @@ -314,9 +314,9 @@ __res_vinit(res_state statp, int preinit
5 cp++;
6 if ((*cp != '\0') && (*cp != '\n')
7 && __inet_aton(cp, &a)) {
8 - statp->nsaddr_list[nservall].sin_addr = a;
9 - statp->nsaddr_list[nservall].sin_family = AF_INET;
10 - statp->nsaddr_list[nservall].sin_port =
11 + statp->nsaddr_list[nserv].sin_addr = a;
12 + statp->nsaddr_list[nserv].sin_family = AF_INET;
13 + statp->nsaddr_list[nserv].sin_port =
14 htons(NAMESERVER_PORT);
15 nserv++;
16 #ifdef _LIBC
17 diff -rup a/resolv/res_send.c b/resolv/res_send.c
18 --- a/resolv/res_send.c 2010-05-04 05:27:23.000000000 -0600
19 +++ b/resolv/res_send.c 2012-07-26 15:34:58.398261659 -0600
20 @@ -421,10 +421,10 @@ __libc_res_nsend(res_state statp, const
21 EXT(statp).nsmap[n] = MAXNS;
22 }
23 }
24 - n = statp->nscount;
25 - if (statp->nscount > EXT(statp).nscount)
26 + n = statp->nscount - EXT(statp).nscount6;
27 + if (n > EXT(statp).nscount)
28 for (n = EXT(statp).nscount, ns = 0;
29 - n < statp->nscount; n++) {
30 + n < statp->nscount - EXT(statp).nscount6; n++) {
31 while (ns < MAXNS
32 && EXT(statp).nsmap[ns] != MAXNS)
33 ns++;
34 @@ -441,7 +441,7 @@ __libc_res_nsend(res_state statp, const
35 malloc(sizeof (struct sockaddr_in6));
36 if (EXT(statp).nsaddrs[n] != NULL) {
37 memset (mempcpy(EXT(statp).nsaddrs[n],
38 - &statp->nsaddr_list[n],
39 + &statp->nsaddr_list[ns],
40 sizeof (struct sockaddr_in)),
41 '\0',
42 sizeof (struct sockaddr_in6)