Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/route PR/40455: Mihai Chelaru: Add noreject noblackhole...
details: https://anonhg.NetBSD.org/src/rev/8d6c78674035
branches: trunk
changeset: 754787:8d6c78674035
user: christos <christos%NetBSD.org@localhost>
date: Wed May 12 17:56:13 2010 +0000
description:
PR/40455: Mihai Chelaru: Add noreject noblackhole options
diffstat:
sbin/route/keywords.c | 4 +++-
sbin/route/keywords.h | 4 +++-
sbin/route/route.8 | 30 ++++++++++++++++--------------
sbin/route/route.c | 10 ++++++++--
4 files changed, 30 insertions(+), 18 deletions(-)
diffs (111 lines):
diff -r f2821e85eb89 -r 8d6c78674035 sbin/route/keywords.c
--- a/sbin/route/keywords.c Wed May 12 17:20:24 2010 +0000
+++ b/sbin/route/keywords.c Wed May 12 17:56:13 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: keywords.c,v 1.6 2006/08/06 17:44:56 dyoung Exp $ */
+/* $NetBSD: keywords.c,v 1.7 2010/05/12 17:56:13 christos Exp $ */
/* WARNING! This file was generated by keywords.sh */
@@ -57,6 +57,8 @@
{"xns", K_XNS},
{"xresolve", K_XRESOLVE},
{"flushall", K_FLUSHALL},
+ {"noblackhole", K_NOBLACKHOLE},
+ {"noreject", K_NOREJECT},
{0, 0}
};
diff -r f2821e85eb89 -r 8d6c78674035 sbin/route/keywords.h
--- a/sbin/route/keywords.h Wed May 12 17:20:24 2010 +0000
+++ b/sbin/route/keywords.h Wed May 12 17:56:13 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: keywords.h,v 1.9 2006/08/06 17:44:56 dyoung Exp $ */
+/* $NetBSD: keywords.h,v 1.10 2010/05/12 17:56:13 christos Exp $ */
/* WARNING! This file was generated by keywords.sh */
@@ -59,3 +59,5 @@
#define K_FLUSHALL 49
#define K_NOCLONED 50
#define K_NOCLONING 51
+#define K_NOBLACKHOLE 52
+#define K_NOREJECT 53
diff -r f2821e85eb89 -r 8d6c78674035 sbin/route/route.8
--- a/sbin/route/route.8 Wed May 12 17:20:24 2010 +0000
+++ b/sbin/route/route.8 Wed May 12 17:56:13 2010 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: route.8,v 1.40 2006/08/06 23:38:13 wiz Exp $
+.\" $NetBSD: route.8,v 1.41 2010/05/12 17:56:13 christos Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -267,19 +267,21 @@
These flags may be set (or sometimes cleared)
by indicating the following corresponding modifiers:
.Bd -literal
--cloning RTF_CLONING - generates a new route on use
--nocloning ~RTF_CLONING - stop generating new routes on use
--cloned RTF_CLONED - cloned route generated by RTF_CLONING
--nocloned ~RTF_CLONED - prevent removal with RTF_CLONING parent
--xresolve RTF_XRESOLVE - emit mesg on use (for external lookup)
--iface ~RTF_GATEWAY - destination is directly reachable
--static RTF_STATIC - manually added route
--nostatic ~RTF_STATIC - pretend route added by kernel or daemon
--reject RTF_REJECT - emit an ICMP unreachable when matched
--blackhole RTF_BLACKHOLE - silently discard pkts (during updates)
--proto1 RTF_PROTO1 - set protocol specific routing flag #1
--proto2 RTF_PROTO2 - set protocol specific routing flag #2
--llinfo RTF_LLINFO - validly translates proto addr to link addr
+-cloning RTF_CLONING - generates a new route on use
+-nocloning ~RTF_CLONING - stop generating new routes on use
+-cloned RTF_CLONED - cloned route generated by RTF_CLONING
+-nocloned ~RTF_CLONED - prevent removal with RTF_CLONING parent
+-xresolve RTF_XRESOLVE - emit mesg on use (for external lookup)
+-iface ~RTF_GATEWAY - destination is directly reachable
+-static RTF_STATIC - manually added route
+-nostatic ~RTF_STATIC - pretend route added by kernel or daemon
+-reject RTF_REJECT - emit an ICMP unreachable when matched
+-noreject ~RTF_REJECT - clear reject flag
+-blackhole RTF_BLACKHOLE - silently discard pkts (during updates)
+-noblackhole ~RTF_BLACKHOLE - clear blackhole flag
+-proto1 RTF_PROTO1 - set protocol specific routing flag #1
+-proto2 RTF_PROTO2 - set protocol specific routing flag #2
+-llinfo RTF_LLINFO - validly translates proto addr to link addr
.Ed
.Pp
The optional modifiers
diff -r f2821e85eb89 -r 8d6c78674035 sbin/route/route.c
--- a/sbin/route/route.c Wed May 12 17:20:24 2010 +0000
+++ b/sbin/route/route.c Wed May 12 17:56:13 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: route.c,v 1.119 2008/12/28 20:12:31 christos Exp $ */
+/* $NetBSD: route.c,v 1.120 2010/05/12 17:56:13 christos Exp $ */
/*
* Copyright (c) 1983, 1989, 1991, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)route.c 8.6 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: route.c,v 1.119 2008/12/28 20:12:31 christos Exp $");
+__RCSID("$NetBSD: route.c,v 1.120 2010/05/12 17:56:13 christos Exp $");
#endif
#endif /* not lint */
@@ -843,9 +843,15 @@
case K_REJECT:
flags |= RTF_REJECT;
break;
+ case K_NOREJECT:
+ flags &= ~RTF_REJECT;
+ break;
case K_BLACKHOLE:
flags |= RTF_BLACKHOLE;
break;
+ case K_NOBLACKHOLE:
+ flags &= ~RTF_BLACKHOLE;
+ break;
case K_CLONED:
flags |= RTF_CLONED;
break;
Home |
Main Index |
Thread Index |
Old Index