summaryrefslogtreecommitdiff
path: root/net/bind9/patches/patch-ab
blob: 9b26c64ee4f790ccc9d7b5cd40503e6548709c81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$NetBSD: patch-ab,v 1.7 2001/11/27 03:38:42 itojun Exp $

--- lib/lwres/getnameinfo.c.orig	Sat Jul 14 08:34:02 2001
+++ lib/lwres/getnameinfo.c	Tue Jul 17 10:14:33 2001
@@ -66,6 +66,10 @@
 #include <lwres/net.h>
 #include <lwres/netdb.h>
 
+#ifdef __KAME__
+#include <net/if.h>
+#endif
+
 #include "assert_p.h"
 
 #define SUCCESS 0
@@ -214,13 +218,11 @@
 		    ((const struct sockaddr_in6 *)sa)->sin6_scope_id) {
 			char *p = numaddr + strlen(numaddr);
 			const char *stringscope = NULL;
-#if 0
+
+#ifdef __KAME__
 			if ((flags & NI_NUMERICSCOPE) == 0) {
-				/*
-				 * Vendors may want to add support for
-				 * non-numeric scope identifier.
-				 */
-				stringscope = foo;
+				stringscope = if_indextoname(
+				    ((const struct sockaddr_in6 *)sa)->sin6_scope_id);
 			}
 #endif
 			if (stringscope == NULL) {