Source-Changes-HG archive

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

[src/trunk]: src/sbin/route tweak IPv6 case so that "route show" does not tru...



details:   https://anonhg.NetBSD.org/src/rev/9821409f905d
branches:  trunk
changeset: 474722:9821409f905d
user:      itojun <itojun%NetBSD.org@localhost>
date:      Sat Jul 17 06:51:27 1999 +0000

description:
tweak IPv6 case so that "route show" does not truncate numeric IPv6 address.

PR: 7955

diffstat:

 sbin/route/route.8 |  3 ++-
 sbin/route/show.c  |  7 +++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diffs (45 lines):

diff -r 916bbbb88f35 -r 9821409f905d sbin/route/route.8
--- a/sbin/route/route.8        Sat Jul 17 06:41:36 1999 +0000
+++ b/sbin/route/route.8        Sat Jul 17 06:51:27 1999 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: route.8,v 1.18 1999/07/02 15:29:03 itojun Exp $
+.\"    $NetBSD: route.8,v 1.19 1999/07/17 06:51:27 itojun Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -350,6 +350,7 @@
 .Nm
 command appeared in
 .Bx 4.2 .
+IPv6 support was added by WIDE/KAME project.
 .Sh BUGS
 The first paragraph may have slightly exaggerated
 .Xr routed 8 Ns 's
diff -r 916bbbb88f35 -r 9821409f905d sbin/route/show.c
--- a/sbin/route/show.c Sat Jul 17 06:41:36 1999 +0000
+++ b/sbin/route/show.c Sat Jul 17 06:51:27 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: show.c,v 1.10 1999/07/12 20:46:15 itojun Exp $ */
+/*     $NetBSD: show.c,v 1.11 1999/07/17 06:51:27 itojun Exp $ */
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "from: @(#)route.c      8.3 (Berkeley) 3/9/94";
 #else
-__RCSID("$NetBSD: show.c,v 1.10 1999/07/12 20:46:15 itojun Exp $");
+__RCSID("$NetBSD: show.c,v 1.11 1999/07/17 06:51:27 itojun Exp $");
 #endif
 #endif /* not lint */
 
@@ -311,6 +311,9 @@
                      sin->sin6_addr.s6_addr32[3] == 0) ? "default" :
                        ((flags & RTF_HOST) ?
                        routename(sa) : netname(sa));
+               /* make sure numeric address is not truncated */
+               if (strchr(cp, ':') != NULL && strlen(cp) > width)
+                       width = strlen(cp);
                break;
            }
 #endif /* INET6 */



Home | Main Index | Thread Index | Old Index