diff options
author | itojun <itojun> | 2001-01-28 06:50:22 +0000 |
---|---|---|
committer | itojun <itojun> | 2001-01-28 06:50:22 +0000 |
commit | cb6060d7792a735154c35f61564fc58189b9c3c7 (patch) | |
tree | 904da3a8d05a80dccf96cacd18ea1e0c26c2c5ff /net/bind9 | |
parent | 133aa3bfce7fc7eb8e2c2073673b79a174a4aff3 (diff) | |
download | pkgsrc-cb6060d7792a735154c35f61564fc58189b9c3c7.tar.gz |
support KAME scope identifier (interface names).
vanilla BIND9 supports numeric scope identifiers.
Diffstat (limited to 'net/bind9')
-rw-r--r-- | net/bind9/files/patch-sum | 4 | ||||
-rw-r--r-- | net/bind9/patches/patch-ab | 34 | ||||
-rw-r--r-- | net/bind9/patches/patch-ac | 39 |
3 files changed, 76 insertions, 1 deletions
diff --git a/net/bind9/files/patch-sum b/net/bind9/files/patch-sum index 04d90660d59..2866c9a3009 100644 --- a/net/bind9/files/patch-sum +++ b/net/bind9/files/patch-sum @@ -1,3 +1,5 @@ -$NetBSD: patch-sum,v 1.8 2001/01/18 13:12:06 itojun Exp $ +$NetBSD: patch-sum,v 1.9 2001/01/28 06:50:22 itojun Exp $ MD5 (patch-aa) = 3be805415711351895d5a56902402991 +MD5 (patch-ab) = c89b529b57569fe7d576363b16d47831 +MD5 (patch-ac) = 39674a6def784d6011004d80fb36e271 diff --git a/net/bind9/patches/patch-ab b/net/bind9/patches/patch-ab new file mode 100644 index 00000000000..95a6d025281 --- /dev/null +++ b/net/bind9/patches/patch-ab @@ -0,0 +1,34 @@ +$NetBSD: patch-ab,v 1.5 2001/01/28 06:50:22 itojun Exp $ +support for kame scopeid extension (assumes that link scope = interface) + +--- lib/lwres/getnameinfo.c- Sun Jan 28 15:34:19 2001 ++++ lib/lwres/getnameinfo.c Sun Jan 28 15:36:33 2001 +@@ -63,6 +63,9 @@ + #include <sys/socket.h> + + #include <netinet/in.h> ++#ifdef __KAME__ ++#include <net/if.h> ++#endif + + #include <stdio.h> + #include <string.h> +@@ -219,14 +222,10 @@ + ((const struct sockaddr_in6 *)sa)->sin6_scope_id) { + char *p = numaddr + strlen(numaddr); + const char *stringscope = NULL; +-#if 0 +- if ((flags & NI_NUMERICSCOPE) == 0) { +- /* +- * Vendors may want to add support for +- * non-numeric scope identifier. +- */ +- stringscope = foo; +- } ++ ++#ifdef __KAME__ ++ stringscope = if_indextoname( ++ ((const struct sockaddr_in6 *)sa)->sin6_scope_id); + #endif + if (stringscope == NULL) { + snprintf(p, sizeof(numaddr) - (p - numaddr), diff --git a/net/bind9/patches/patch-ac b/net/bind9/patches/patch-ac new file mode 100644 index 00000000000..4e6aa4efed3 --- /dev/null +++ b/net/bind9/patches/patch-ac @@ -0,0 +1,39 @@ +$NetBSD: patch-ac,v 1.3 2001/01/28 06:50:22 itojun Exp $ +support for kame scopeid extension (assumes that link scope = interface) + +--- lib/lwres/getaddrinfo.c- Sun Jan 28 15:34:17 2001 ++++ lib/lwres/getaddrinfo.c Sun Jan 28 15:38:37 2001 +@@ -28,6 +28,9 @@ + #include <sys/un.h> + + #include <netinet/in.h> ++#ifdef __KAME__ ++#include <net/if.h> ++#endif + + #include <arpa/nameser.h> + #include <arpa/inet.h> +@@ -262,14 +265,18 @@ + p = strchr(ntmp, '%'); + ep = NULL; + +- /* +- * Vendors may want to support non-numeric +- * scopeid around here. +- */ ++#ifdef __KAME__ ++ if (p != NULL) { ++ scopeid = if_nametoindex(p + 1); ++ if (scopeid) ++ p = NULL; ++ } ++#endif + +- if (p != NULL) ++ if (p != NULL) { + scopeid = (lwres_uint32_t)strtoul(p + 1, + &ep, 10); ++ } + if (p != NULL && ep != NULL && ep[0] == '\0') + *p = '\0'; + else { |