Fix rump.{netstat,route} shows host's interface names in link local addresses

Interface names of IPv6 link local addresses are resolved
by getnameinfo(3). So we need to rump-ify it as well as
if_indextoname and getifaddrs.
This commit is contained in:
ozaki-r 2015-05-15 06:58:59 +00:00
parent 47b1040f9a
commit 6011d36bd6
3 changed files with 8 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: getnameinfo.c,v 1.54 2013/08/16 15:27:12 christos Exp $ */
/* $NetBSD: getnameinfo.c,v 1.55 2015/05/15 06:58:59 ozaki-r Exp $ */
/* $KAME: getnameinfo.c,v 1.45 2000/09/25 22:43:56 itojun Exp $ */
/*
@ -47,10 +47,12 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: getnameinfo.c,v 1.54 2013/08/16 15:27:12 christos Exp $");
__RCSID("$NetBSD: getnameinfo.c,v 1.55 2015/05/15 06:58:59 ozaki-r Exp $");
#endif /* LIBC_SCCS and not lint */
#ifndef RUMP_ACTION
#include "namespace.h"
#endif
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.27 2015/04/22 03:07:55 ozaki-r Exp $
# $NetBSD: Makefile,v 1.28 2015/05/15 06:58:59 ozaki-r Exp $
# @(#)Makefile 8.1 (Berkeley) 6/5/93
.include <bsd.own.mk>
@ -8,7 +8,7 @@ MAN= route.8
SRCS= route.c show.c keywords.c rtutil.c
.PATH: ${.CURDIR}/../../lib/libc/net
RUMPSRCS= if_indextoname.c getifaddrs.c
RUMPSRCS= if_indextoname.c getifaddrs.c getnameinfo.c
.if (${MKRUMP} != "no")
CPPFLAGS+= -DRUMP_ACTION
.endif

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.41 2015/02/07 19:36:06 christos Exp $
# $NetBSD: Makefile,v 1.42 2015/05/15 06:58:59 ozaki-r Exp $
# from: @(#)Makefile 8.1 (Berkeley) 6/12/93
.include <bsd.own.mk>
@ -25,7 +25,7 @@ COPTS.show.c += -Wno-format-nonliteral
.PATH: ${.CURDIR}/../../sbin/route
CPPFLAGS+= -DRUMP_ACTION
RUMPSRCS+= sysctlbyname.c sysctlgetmibinfo.c sysctlnametomib.c
RUMPSRCS+= if_indextoname.c getifaddrs.c
RUMPSRCS+= if_indextoname.c getifaddrs.c getnameinfo.c
.if (${USE_INET6} != "no")
CPPFLAGS+= -DINET6