r2818 - in glibc-package/trunk/debian: . patches patches/any
Author: aurel32
Date: 2008-02-19 22:10:12 +0000 (Tue, 19 Feb 2008)
New Revision: 2818
Added:
glibc-package/trunk/debian/patches/any/submitted-link-local_resolver.diff
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/patches/series
Log:
* any/submitted-link-local_resolver.diff: kernel 2.6.24 is out, don't wait
indefinitely for upstream. This patch from Pierre Ynard adds support for
link-local addresses in /etc/resolv.conf.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2008-02-17 21:09:47 UTC (rev 2817)
+++ glibc-package/trunk/debian/changelog 2008-02-19 22:10:12 UTC (rev 2818)
@@ -3,8 +3,11 @@
* patches/any/local-ldso-disable-hwcap.diff: revert previous changes
as they break etch -> lenny upgrades. Closes: #465753.
* kfreebsd/local-sysdeps.diff: update to revision 2137 (from glibc-bsd).
+ * any/submitted-link-local_resolver.diff: kernel 2.6.24 is out, don't wait
+ indefinitely for upstream. This patch from Pierre Ynard adds support for
+ link-local addresses in /etc/resolv.conf.
- -- Aurelien Jarno <aurel32@debian.org> Sun, 17 Feb 2008 22:08:45 +0100
+ -- Aurelien Jarno <aurel32@debian.org> Tue, 19 Feb 2008 23:06:29 +0100
glibc (2.7-8) unstable; urgency=low
Added: glibc-package/trunk/debian/patches/any/submitted-link-local_resolver.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/submitted-link-local_resolver.diff (rev 0)
+++ glibc-package/trunk/debian/patches/any/submitted-link-local_resolver.diff 2008-02-19 22:10:12 UTC (rev 2818)
@@ -0,0 +1,74 @@
+It seems that glibc's resolver does not support IPv6 link-local
+addresses with an explicit scope (like fe80::[...]%eth0), in the
+nameserver options in /etc/resolv.conf. Currently, nameservers with a
+scope fail to be parsed. Nameservers with a link-local address (without
+scope) are parsed and used, but obviously do not work (connect() fails
+with EINVAL because a sin6_scope_id of 0 is used with the link-local
+address).
+
+With the apparition of the new RDNSS option (RFC5006), which allows
+for DNS configuration through stateless autoconf, we expect that IPv6
+link-local resolvers may be used, and set into /etc/resolv.conf.
+Kernel-side support is included in Linux 2.6.24, and the corresponding
+userland RDNSS daemon is currently under development and will be shipped
+in the next release of the ndisc6 package. We would need glibc to
+support this feature to integrate our work.
+
+Please review this patch, and consider it for application and submission
+to upstream.
+
+--- resolv/res_init.c 2007-12-09 17:30:57.000000000 +0100
++++ resolv/res_init.c 2007-12-09 18:19:40.000000000 +0100
+@@ -74,11 +74,14 @@ static const char rcsid[] = "$BINDId: re
+ #include <sys/socket.h>
+ #include <sys/time.h>
+
++#include <net/if.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <arpa/nameser.h>
+
++#include <assert.h>
+ #include <ctype.h>
++#include <netdb.h>
+ #include <resolv.h>
+ #include <stdio.h>
+ #include <stdio_ext.h>
+@@ -327,6 +330,8 @@ __res_vinit(res_state statp, int preinit
+
+ if ((el = strchr(cp, '\n')) != NULL)
+ *el = '\0';
++ if ((el = strchr(cp, SCOPE_DELIMITER)) != NULL)
++ *el = '\0';
+ if ((*cp != '\0') &&
+ (inet_pton(AF_INET6, cp, &a6) > 0)) {
+ struct sockaddr_in6 *sa6;
+@@ -336,6 +341,27 @@ __res_vinit(res_state statp, int preinit
+ sa6->sin6_addr = a6;
+ sa6->sin6_family = AF_INET6;
+ sa6->sin6_port = htons(NAMESERVER_PORT);
++
++ if (el != NULL) {
++ int try_numericscope = 0;
++ if (IN6_IS_ADDR_LINKLOCAL(&a6)
++ || IN6_IS_ADDR_MC_LINKLOCAL(&a6)) {
++ sa6->sin6_scope_id = if_nametoindex(el + 1);
++ if (sa6->sin6_scope_id == 0)
++ try_numericscope = 1;
++ } else
++ try_numericscope = 1;
++
++ if (try_numericscope != 0) {
++ char *end;
++ assert(sizeof(uint32_t) <= sizeof(unsigned long));
++ sa6->sin6_scope_id = (uint32_t) strtoul(el + 1, &end, 10);
++ if (*end != '\0')
++ sa6->sin6_scope_id = 0;
++ }
++ } else
++ sa6->sin6_scope_id = 0;
++
+ statp->_u._ext.nsaddrs[nservall] = sa6;
+ statp->_u._ext.nssocks[nservall] = -1;
+ statp->_u._ext.nsmap[nservall] = MAXNS + 1;
+
Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series 2008-02-17 21:09:47 UTC (rev 2817)
+++ glibc-package/trunk/debian/patches/series 2008-02-19 22:10:12 UTC (rev 2818)
@@ -185,6 +185,7 @@
any/submitted-libgcc_s.so.diff -p0
any/submitted-longdouble.diff -p0
any/submitted-sched_h.diff -p0
+any/submitted-link-local_resolver.diff -p0
any/local-disable-nscd-host-caching.diff
#any/submitted-fileops-and-signals.diff
any/local-missing-linux_types.h.diff
Reply to: