Author: aurel32
Date: 2007-09-03 16:20:57 +0000 (Mon, 03 Sep 2007)
New Revision: 2530

Added:
   glibc-package/trunk/debian/patches/any/local-ipv6-lookup.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
  * any/local-ipv6-lookup.diff: new patch to do IPv6 lookups only when an 
    IPv6 address is configured. Patch by Tollef Fog Heen and Andrew McMillan.
    Closes: #435646.



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog        2007-09-03 16:04:19 UTC (rev 
2529)
+++ glibc-package/trunk/debian/changelog        2007-09-03 16:20:57 UTC (rev 
2530)
@@ -31,11 +31,14 @@
     restart.  Closes: bug#435640.
   * Bump shlibdeps version to 2.6.1-1 due to SPARC v9 transition.
   * New Slovak debconf translation, by Ivan Masár.  Closes: bug#438576.
+  * any/local-ipv6-lookup.diff: new patch to do IPv6 lookups only when an 
+    IPv6 address is configured. Patch by Tollef Fog Heen and Andrew McMillan.
+    Closes: #435646.
 
   [ Pierre Habouzit ]
   * Document new libc.conf in ld.so.conf.d that puts /usr/local/lib front.
 
- -- Aurelien Jarno <[EMAIL PROTECTED]>  Mon,  3 Sep 2007 18:03:58 +0200
+ -- Aurelien Jarno <[EMAIL PROTECTED]>  Mon,  3 Sep 2007 18:15:37 +0200
 
 glibc (2.6.1-1) unstable; urgency=low
 

Added: glibc-package/trunk/debian/patches/any/local-ipv6-lookup.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/local-ipv6-lookup.diff               
                (rev 0)
+++ glibc-package/trunk/debian/patches/any/local-ipv6-lookup.diff       
2007-09-03 16:20:57 UTC (rev 2530)
@@ -0,0 +1,47 @@
+diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
+index adb3c4f..d12835c 100644
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -263,7 +263,7 @@ extern service_user *__nss_hosts_database attribute_hidden;
+ static int
+ gaih_inet (const char *name, const struct gaih_service *service,
+          const struct addrinfo *req, struct addrinfo **pai,
+-         unsigned int *naddrs)
++         unsigned int *naddrs, bool usable_ipv6)
+ {
+   const struct gaih_typeproto *tp = gaih_inet_typeproto;
+   struct gaih_servtuple *st = (struct gaih_servtuple *) &nullserv;
+@@ -706,7 +706,7 @@ gaih_inet (const char *name, const struct gaih_service 
*service,
+             if (fct != NULL)
+               {
+                 if (req->ai_family == AF_INET6
+-                    || req->ai_family == AF_UNSPEC)
++                    || (req->ai_family == AF_UNSPEC && usable_ipv6))
+                   {
+                     gethosts (AF_INET6, struct in6_addr);
+                     no_inet6_data = no_data;
+@@ -1903,7 +1903,7 @@ getaddrinfo (const char *name, const char *service,
+   if (hints->ai_family == AF_UNSPEC || hints->ai_family == AF_INET
+       || hints->ai_family == AF_INET6)
+     {
+-      last_i = gaih_inet (name, pservice, hints, end, &naddrs);
++      last_i = gaih_inet (name, pservice, hints, end, &naddrs, seen_ipv6);
+       if (last_i != 0)
+       {
+         freeaddrinfo (p);
+diff --git a/sysdeps/unix/sysv/linux/check_pf.c 
b/sysdeps/unix/sysv/linux/check_pf.c
+index 46161a8..5287ed0 100644
+--- a/sysdeps/unix/sysv/linux/check_pf.c
++++ b/sysdeps/unix/sysv/linux/check_pf.c
+@@ -146,7 +146,10 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool 
*seen_ipv6,
+                 *seen_ipv4 = true;
+                 break;
+               case AF_INET6:
+-                *seen_ipv6 = true;
++                if (ifam->ifa_scope < RT_SCOPE_LINK)
++                  {
++                    *seen_ipv6 = true;
++                  }
+ 
+                 if (ifam->ifa_flags & (IFA_F_DEPRECATED
+                                        | IFA_F_TEMPORARY

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series   2007-09-03 16:04:19 UTC (rev 
2529)
+++ glibc-package/trunk/debian/patches/series   2007-09-03 16:20:57 UTC (rev 
2530)
@@ -116,6 +116,7 @@
 any/local-gcc4-wcstol_l.diff 
 # any/local-globfree-clear.diff -p1    #  g: suspended
 any/local-iconv-fix-trampoline.diff 
+any/local-ipv6-lookup.diff -p1
 any/local-ld-multiarch.diff -p0
 any/local-ldd.diff -p0
 any/local-ldso-disable-hwcap.diff -p0


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to