[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r2515 - in glibc-package/trunk/debian: . patches patches/any



Author: aurel32
Date: 2007-08-16 21:16:28 +0000 (Thu, 16 Aug 2007)
New Revision: 2515

Added:
   glibc-package/trunk/debian/patches/any/submitted-rfc3484-sortv4.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
  * any/submitted-rfc3484-sortv4.diff: new patch to allow bypassing RFC3484
    rule 9 for IPv4 adresses.  Closes: bug#438179



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2007-08-16 19:48:07 UTC (rev 2514)
+++ glibc-package/trunk/debian/changelog	2007-08-16 21:16:28 UTC (rev 2515)
@@ -21,8 +21,10 @@
   * debhelper.in/locales.install: install it.
   * debian/local/manpages/locale.1: fix a typo.  Closes: bug#438114.
   * kfreebsd/local-sysdeps.diff: update to revision 1995 (from glibc-bsd).
+  * any/submitted-rfc3484-sortv4.diff: new patch to allow bypassing RFC3484
+    rule 9 for IPv4 adresses.  Closes: bug#438179
 
- -- Aurelien Jarno <aurel32@debian.org>  Thu, 16 Aug 2007 21:47:54 +0200
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 16 Aug 2007 23:12:22 +0200
 
 glibc (2.6.1-1) unstable; urgency=low
 

Added: glibc-package/trunk/debian/patches/any/submitted-rfc3484-sortv4.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/submitted-rfc3484-sortv4.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/any/submitted-rfc3484-sortv4.diff	2007-08-16 21:16:28 UTC (rev 2515)
@@ -0,0 +1,79 @@
+2007-08-16  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* sysdeps/posix/getaddrinfo.c (gaiconf_reload_flag): Move
+	to the top of the file. 
+	(gaiconf_mtime): Likewise.
+	(sortv4): New configuration variable.
+	(gaiconf_init): Parse the sortv4 option in the configuration
+	file.
+	(rfc3484_sort): Ignore rule 9 for IPv4 adresses if sortv4
+	is false.
+	* posix/gai.conf: Add the new sortv4 option.
+
+
+--- posix/gai.conf	2007-08-16 22:59:03.000000000 +0200
++++ posix/gai.conf	2007-08-16 22:58:48.000000000 +0200
+@@ -15,6 +15,11 @@
+ #    changed and if necessary reload.  This option should not really be
+ #    used.  There are possible runtime problems.  The default is no.
+ #
++# sortv4  <yes|no>
++#    If set to no, getaddrinfo(3) will ignore IPv4 adresses in rule 9.  See
++#    section 6 in RFC 3484.  The default is yes.  Setting this option to 
++#    no breaks conformance to RFC 3484.
++#
+ # label   <mask>   <value>
+ #    Add another rule to the RFC 3484 label table.  See section 2.1 in
+ #    RFC 3484.  The default is:
+--- sysdeps/posix/getaddrinfo.c 2007-08-16 23:02:34.000000000 +0200
++++ sysdeps/posix/getaddrinfo.c	2007-08-16 22:31:53.000000000 +0200
+@@ -79,6 +79,16 @@
+ # define UNIX_PATH_MAX  108
+ #endif
+ 
++/* Nozero if we are supposed to reload the config file automatically
++   whenever it changed.  */
++static int gaiconf_reload_flag;
++
++/* Zero if we are supposed to ignore rule 9 for IPv4 addresses */
++static int gaiconf_sortv4_flag = 1;
++
++/* Last modification time.  */
++static struct timespec gaiconf_mtime;
++
+ struct gaih_service
+   {
+     const char *name;
+@@ -1344,7 +1354,7 @@
+       int bit1 = 0;
+       int bit2 = 0;
+ 
+-      if (a1->dest_addr->ai_family == PF_INET)
++      if (a1->dest_addr->ai_family == PF_INET && gaiconf_sortv4_flag)
+ 	{
+ 	  assert (a1->source_addr.ss_family == PF_INET);
+ 	  assert (a2->source_addr.ss_family == PF_INET);
+@@ -1422,14 +1432,6 @@
+ #define GAICONF_FNAME "/etc/gai.conf"
+ 
+ 
+-/* Nozero if we are supposed to reload the config file automatically
+-   whenever it changed.  */
+-static int gaiconf_reload_flag;
+-
+-/* Last modification time.  */
+-static struct timespec gaiconf_mtime;
+-
+-
+ libc_freeres_fn(fini)
+ {
+   if (labels != default_labels)
+@@ -1608,6 +1610,8 @@
+ 	    case 6:
+ 	      if (strcmp (cmd, "reload") == 0)
+ 		gaiconf_reload_flag = strcmp (val1, "yes") == 0;
++	      else if (strcmp (cmd, "sortv4") == 0)
++		gaiconf_sortv4_flag = strcmp (val1, "no") != 0;
+ 	      break;
+ 
+ 	    case 10:

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series	2007-08-16 19:48:07 UTC (rev 2514)
+++ glibc-package/trunk/debian/patches/series	2007-08-16 21:16:28 UTC (rev 2515)
@@ -147,6 +147,7 @@
 any/submitted-date-and-unknown-tz.diff -p0
 any/submitted-libgcc_s.so.diff -p0
 any/submitted-longdouble.diff -p0
+any/submitted-rfc3484-sortv4.diff -p0
 any/submitted-strfry.diff -p0
 any/submitted-strtok.diff -p0
 any/local-disable-nscd-host-caching.diff



Reply to: