summaryrefslogtreecommitdiff
path: root/net/bind98/patches/patch-lib_lwres_getnameinfo.c
blob: 96b19630abf59ed278a419ad9d7b631775bbd264 (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
$NetBSD: patch-lib_lwres_getnameinfo.c,v 1.1.1.1 2011/03/04 03:52:15 taca Exp $

--- lib/lwres/getnameinfo.c.orig	2007-06-19 23:47:22.000000000 +0000
+++ lib/lwres/getnameinfo.c
@@ -121,6 +121,10 @@
 #include <lwres/netdb.h>
 #include "print_p.h"
 
+#ifdef __KAME__
+#include <net/if.h>
+#endif
+
 #include "assert_p.h"
 
 #define SUCCESS 0
@@ -271,13 +275,9 @@ lwres_getnameinfo(const struct sockaddr 
 		    ((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) {