Module Name:    src
Committed By:   roy
Date:           Thu Feb 26 09:56:11 UTC 2015

Modified Files:
        src/sbin/route: route.8 route.c rtutil.c show.c

Log Message:
Teach route(8) about RTF_LOCAL.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sbin/route/route.8
cvs rdiff -u -r1.149 -r1.150 src/sbin/route/route.c
cvs rdiff -u -r1.4 -r1.5 src/sbin/route/rtutil.c
cvs rdiff -u -r1.46 -r1.47 src/sbin/route/show.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/route/route.8
diff -u src/sbin/route/route.8:1.53 src/sbin/route/route.8:1.54
--- src/sbin/route/route.8:1.53	Mon Dec  1 20:30:27 2014
+++ src/sbin/route/route.8	Thu Feb 26 09:56:11 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: route.8,v 1.53 2014/12/01 20:30:27 christos Exp $
+.\"	$NetBSD: route.8,v 1.54 2015/02/26 09:56:11 roy Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)route.8	8.4 (Berkeley) 6/1/94
 .\"
-.Dd December 1, 2014
+.Dd February 26, 2015
 .Dt ROUTE 8
 .Os
 .Sh NAME
@@ -304,6 +304,7 @@ by indicating the following correspondin
 .It Li G Ta "" Ta " RTF_GATEWAY" Ta forwarded to dest by intermediary
 .It Li H Ta "" Ta " RTF_HOST" Ta host entry (net otherwise)
 .It Li L Ta -llinfo Ta " RTF_LLINFO" Ta translate proto to link addr
+.It Li l Ta "" Ta " RTF_LOCAL" Ta Route represents a local address
 .It Li M Ta "" Ta " RTF_MODIFIED" Ta modified dynamically (redirect)
 .It Li p Ta -proxy Ta " RTF_ANNOUNCE" Ta make entry a link level proxy
 .It Li R Ta -reject Ta " RTF_REJECT" Ta send ICMP unreachable on match

Index: src/sbin/route/route.c
diff -u src/sbin/route/route.c:1.149 src/sbin/route/route.c:1.150
--- src/sbin/route/route.c:1.149	Sat Dec 20 13:15:48 2014
+++ src/sbin/route/route.c	Thu Feb 26 09:56:11 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.149 2014/12/20 13:15:48 prlw1 Exp $	*/
+/*	$NetBSD: route.c,v 1.150 2015/02/26 09:56:11 roy Exp $	*/
 
 /*
  * Copyright (c) 1983, 1989, 1991, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = "@(#)route.c	8.6 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: route.c,v 1.149 2014/12/20 13:15:48 prlw1 Exp $");
+__RCSID("$NetBSD: route.c,v 1.150 2015/02/26 09:56:11 roy Exp $");
 #endif
 #endif /* not lint */
 
@@ -1292,7 +1292,7 @@ const char * const msgtypes[] = {
 const char metricnames[] =
 "\011pksent\010rttvar\7rtt\6ssthresh\5sendpipe\4recvpipe\3expire\2hopcount\1mtu";
 const char routeflags[] =
-"\1UP\2GATEWAY\3HOST\4REJECT\5DYNAMIC\6MODIFIED\7DONE\010MASK_PRESENT\011CLONING\012XRESOLVE\013LLINFO\014STATIC\015BLACKHOLE\016CLONED\017PROTO2\020PROTO1";
+"\1UP\2GATEWAY\3HOST\4REJECT\5DYNAMIC\6MODIFIED\7DONE\010MASK_PRESENT\011CLONING\012XRESOLVE\013LLINFO\014STATIC\015BLACKHOLE\016CLONED\017PROTO2\020PROTO1\023LOCAL";
 const char ifnetflags[] =
 "\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5PTP\6NOTRAILERS\7RUNNING\010NOARP\011PPROMISC\012ALLMULTI\013OACTIVE\014SIMPLEX\015LINK0\016LINK1\017LINK2\020MULTICAST";
 const char addrnames[] =

Index: src/sbin/route/rtutil.c
diff -u src/sbin/route/rtutil.c:1.4 src/sbin/route/rtutil.c:1.5
--- src/sbin/route/rtutil.c:1.4	Wed Jan  7 22:38:32 2015
+++ src/sbin/route/rtutil.c	Thu Feb 26 09:56:11 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtutil.c,v 1.4 2015/01/07 22:38:32 christos Exp $	*/
+/*	$NetBSD: rtutil.c,v 1.5 2015/02/26 09:56:11 roy Exp $	*/
 /*	$OpenBSD: show.c,v 1.1 2006/05/27 19:16:37 claudio Exp $	*/
 
 /*
@@ -92,6 +92,7 @@ static const struct bits bits[] = {
 	{ RTF_CLONED,	'c' },
 	/* { RTF_JUMBO,	'J' }, */
 	{ RTF_ANNOUNCE,	'p' },
+	{ RTF_LOCAL, 'l'},
 	{ 0, 0 }
 };
 

Index: src/sbin/route/show.c
diff -u src/sbin/route/show.c:1.46 src/sbin/route/show.c:1.47
--- src/sbin/route/show.c:1.46	Thu Nov  6 21:29:32 2014
+++ src/sbin/route/show.c	Thu Feb 26 09:56:11 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: show.c,v 1.46 2014/11/06 21:29:32 christos Exp $	*/
+/*	$NetBSD: show.c,v 1.47 2015/02/26 09:56:11 roy Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "from: @(#)route.c	8.3 (Berkeley) 3/9/94";
 #else
-__RCSID("$NetBSD: show.c,v 1.46 2014/11/06 21:29:32 christos Exp $");
+__RCSID("$NetBSD: show.c,v 1.47 2015/02/26 09:56:11 roy Exp $");
 #endif
 #endif /* not lint */
 
@@ -137,7 +137,7 @@ show(int argc, char *const *argv, int fl
 {
 	int af, rflags;
 	static int interesting = RTF_UP | RTF_GATEWAY | RTF_HOST |
-	    RTF_REJECT | RTF_LLINFO;
+	    RTF_REJECT | RTF_LLINFO | RTF_LOCAL;
 
 	parse_show_opts(argc, argv, &af, &rflags, NULL, true);
 	p_rttables(af, flags, rflags, interesting);

Reply via email to