summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/parse.y
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-07-05 16:54:54 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-07-05 16:54:54 +0000
commit0c6f15423dbbf6b9e1edba3e80bfdb7401771231 (patch)
tree5b622992843afa96215b82ca88a6424b4b4e02cd /usr.sbin/bgpd/parse.y
parentea813441e6def33d7556e3ea99bdb3d93743ea2a (diff)
implement "set nexthop blackhole" and "set nexthop reject"
blackhole/reject routes will be entered to the kernel for matching ones. this is intended to be used with the Cymru Bogon Route Server Project (http://www.cymru.com/BGP/bogon-rs.html) and similar services, claudio ok
Diffstat (limited to 'usr.sbin/bgpd/parse.y')
-rw-r--r--usr.sbin/bgpd/parse.y12
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index d970903d46c..f64bd1083f8 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.117 2004/07/03 17:19:59 claudio Exp $ */
+/* $OpenBSD: parse.y,v 1.118 2004/07/05 16:54:53 henning Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -122,7 +122,7 @@ typedef struct {
%token QUICK
%token FROM TO ANY
%token PREFIX PREFIXLEN SOURCEAS TRANSITAS COMMUNITY
-%token SET LOCALPREF MED NEXTHOP PREPEND PFTABLE
+%token SET LOCALPREF MED NEXTHOP PREPEND PFTABLE REJECT BLACKHOLE
%token ERROR
%token IPSEC ESP AH SPI IKE
%token <v.string> STRING
@@ -929,6 +929,12 @@ filter_set_opt : LOCALPREF number {
YYERROR;
}
}
+ | NEXTHOP BLACKHOLE {
+ $$.flags |= SET_NEXTHOP_BLACKHOLE;
+ }
+ | NEXTHOP REJECT {
+ $$.flags |= SET_NEXTHOP_REJECT;
+ }
| PREPEND number {
$$.flags = SET_PREPEND;
$$.prepend = $2;
@@ -1038,6 +1044,7 @@ lookup(char *s)
{ "allow", ALLOW},
{ "announce", ANNOUNCE},
{ "any", ANY},
+ { "blackhole", BLACKHOLE},
{ "capabilities", CAPABILITIES},
{ "community", COMMUNITY},
{ "deny", DENY},
@@ -1076,6 +1083,7 @@ lookup(char *s)
{ "prefixlen", PREFIXLEN},
{ "prepend-self", PREPEND},
{ "quick", QUICK},
+ { "reject", REJECT},
{ "remote-as", REMOTEAS},
{ "route-collector", ROUTECOLL},
{ "route-reflector", REFLECTOR},