summaryrefslogtreecommitdiff
path: root/net/bind9/patches/patch-ac
diff options
context:
space:
mode:
Diffstat (limited to 'net/bind9/patches/patch-ac')
-rw-r--r--net/bind9/patches/patch-ac39
1 files changed, 39 insertions, 0 deletions
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 {