33 lines
844 B
Plaintext
33 lines
844 B
Plaintext
$NetBSD: patch-ab,v 1.3 2013/09/21 15:57:50 taca Exp $
|
|
|
|
--- lib/lwres/getnameinfo.c.orig 2013-09-05 05:40:13.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
|
|
@@ -272,13 +276,10 @@ lwres_getnameinfo(const struct sockaddr
|
|
((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) {
|