[glibc/f17] - Pack IPv4 servers at the start of nsaddr_list and only track the number of IPV4 servers in E
Jeffrey Law
law at fedoraproject.org
Mon Aug 6 17:52:45 UTC 2012
commit 1f4b9e1d91dda472044a9ecb254df5673dcfe807
Author: Jeff Law <law at redhat.com>
Date: Mon Aug 6 11:52:27 2012 -0600
- Pack IPv4 servers at the start of nsaddr_list and
only track the number of IPV4 servers in EXT(statp->nscount)
(#808147)
glibc-rh841787.patch | 32 +++++++++++++++++++++++++++++++-
glibc.spec | 4 ++++
2 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/glibc-rh841787.patch b/glibc-rh841787.patch
index 331a203..3cec783 100644
--- a/glibc-rh841787.patch
+++ b/glibc-rh841787.patch
@@ -1,6 +1,36 @@
+diff -rup a/resolv/res_init.c b/resolv/res_init.c
+--- a/resolv/res_init.c 2012-07-26 15:10:45.655638776 -0600
++++ b/resolv/res_init.c 2012-07-26 15:11:27.731423002 -0600
+@@ -314,9 +314,9 @@ __res_vinit(res_state statp, int preinit
+ cp++;
+ if ((*cp != '\0') && (*cp != '\n')
+ && __inet_aton(cp, &a)) {
+- statp->nsaddr_list[nservall].sin_addr = a;
+- statp->nsaddr_list[nservall].sin_family = AF_INET;
+- statp->nsaddr_list[nservall].sin_port =
++ statp->nsaddr_list[nserv].sin_addr = a;
++ statp->nsaddr_list[nserv].sin_family = AF_INET;
++ statp->nsaddr_list[nserv].sin_port =
+ htons(NAMESERVER_PORT);
+ nserv++;
+ #ifdef _LIBC
diff -rup a/resolv/res_send.c b/resolv/res_send.c
--- a/resolv/res_send.c 2010-05-04 05:27:23.000000000 -0600
-+++ b/resolv/res_send.c 2012-03-01 12:11:13.065605342 -0700
++++ b/resolv/res_send.c 2012-07-26 15:34:58.398261659 -0600
+@@ -421,10 +421,10 @@ __libc_res_nsend(res_state statp, const
+ EXT(statp).nsmap[n] = MAXNS;
+ }
+ }
+- n = statp->nscount;
+- if (statp->nscount > EXT(statp).nscount)
++ n = statp->nscount - EXT(statp).nscount6;
++ if (n > EXT(statp).nscount)
+ for (n = EXT(statp).nscount, ns = 0;
+- n < statp->nscount; n++) {
++ n < statp->nscount - EXT(statp).nscount6; n++) {
+ while (ns < MAXNS
+ && EXT(statp).nsmap[ns] != MAXNS)
+ ns++;
@@ -441,7 +441,7 @@ __libc_res_nsend(res_state statp, const
malloc(sizeof (struct sockaddr_in6));
if (EXT(statp).nsaddrs[n] != NULL) {
diff --git a/glibc.spec b/glibc.spec
index a4153b8..89dee55 100644
--- a/glibc.spec
+++ b/glibc.spec
@@ -1367,6 +1367,10 @@ rm -f *.filelist*
%endif
%changelog
+* Mon Aug 6 2012 Patsy Franklin <pfrankli at redhat.com> - 2.15.55
+ - Pack IPv4 servers at the start of nsaddr_list and
+ only track the number of IPV4 servers in EXT(statp->nscounti (#808147)
+
* Fri Aug 3 2012 Patsy Franklin <pfrankli at redhat.com> - 2.15.54
- Remove two extraneous lines from previous patch for BZ841318 (#841318)
More information about the scm-commits
mailing list