Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Fix rump.{netstat, route} shows host's interface names in lin...



details:   https://anonhg.NetBSD.org/src/rev/542680dc1ee6
branches:  trunk
changeset: 338217:542680dc1ee6
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri May 15 06:58:59 2015 +0000

description:
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.

diffstat:

 lib/libc/net/getnameinfo.c |  6 ++++--
 sbin/route/Makefile        |  4 ++--
 usr.bin/netstat/Makefile   |  4 ++--
 3 files changed, 8 insertions(+), 6 deletions(-)

diffs (59 lines):

diff -r ffed7cd69039 -r 542680dc1ee6 lib/libc/net/getnameinfo.c
--- a/lib/libc/net/getnameinfo.c        Fri May 15 06:51:24 2015 +0000
+++ b/lib/libc/net/getnameinfo.c        Fri May 15 06:58:59 2015 +0000
@@ -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>
diff -r ffed7cd69039 -r 542680dc1ee6 sbin/route/Makefile
--- a/sbin/route/Makefile       Fri May 15 06:51:24 2015 +0000
+++ b/sbin/route/Makefile       Fri May 15 06:58:59 2015 +0000
@@ -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 @@
 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
diff -r ffed7cd69039 -r 542680dc1ee6 usr.bin/netstat/Makefile
--- a/usr.bin/netstat/Makefile  Fri May 15 06:51:24 2015 +0000
+++ b/usr.bin/netstat/Makefile  Fri May 15 06:58:59 2015 +0000
@@ -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 @@
 .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



Home | Main Index | Thread Index | Old Index