Module Name:    src
Committed By:   christos
Date:           Wed May 12 17:56:13 UTC 2010

Modified Files:
        src/sbin/route: keywords.c keywords.h route.8 route.c

Log Message:
PR/40455: Mihai Chelaru: Add noreject noblackhole options


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sbin/route/keywords.c
cvs rdiff -u -r1.9 -r1.10 src/sbin/route/keywords.h
cvs rdiff -u -r1.40 -r1.41 src/sbin/route/route.8
cvs rdiff -u -r1.119 -r1.120 src/sbin/route/route.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/keywords.c
diff -u src/sbin/route/keywords.c:1.6 src/sbin/route/keywords.c:1.7
--- src/sbin/route/keywords.c:1.6	Sun Aug  6 13:44:56 2006
+++ src/sbin/route/keywords.c	Wed May 12 13:56:13 2010
@@ -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}
 };
 

Index: src/sbin/route/keywords.h
diff -u src/sbin/route/keywords.h:1.9 src/sbin/route/keywords.h:1.10
--- src/sbin/route/keywords.h:1.9	Sun Aug  6 13:44:56 2006
+++ src/sbin/route/keywords.h	Wed May 12 13:56:13 2010
@@ -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

Index: src/sbin/route/route.8
diff -u src/sbin/route/route.8:1.40 src/sbin/route/route.8:1.41
--- src/sbin/route/route.8:1.40	Sun Aug  6 19:38:13 2006
+++ src/sbin/route/route.8	Wed May 12 13:56:13 2010
@@ -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

Index: src/sbin/route/route.c
diff -u src/sbin/route/route.c:1.119 src/sbin/route/route.c:1.120
--- src/sbin/route/route.c:1.119	Sun Dec 28 15:12:31 2008
+++ src/sbin/route/route.c	Wed May 12 13:56:13 2010
@@ -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;

Reply via email to