summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/parse.y
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2004-11-11 10:35:16 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2004-11-11 10:35:16 +0000
commit7fd8b0a80dd57542860d3e31ca8608a1c76db1db (patch)
treed2233ee29f7cd6ea3c7ebe46324f144abce664bf /usr.sbin/bgpd/parse.y
parent842232cd6bfba09e5de10d052af4f9247f5dc28b (diff)
New config statement "rde route-age [evaluate|ignore]". If set to evaluate
the best path selection will not only be based on the path attributes but also on the age of the prefix. This is an extension to the RFC. The default is ignore but previously it was implicitly set to evaluate. OK henning@ man page OK jaredy@ jmc@
Diffstat (limited to 'usr.sbin/bgpd/parse.y')
-rw-r--r--usr.sbin/bgpd/parse.y26
1 files changed, 25 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index 00cf094584d..8cde3ff2169 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.143 2004/11/05 14:30:54 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.144 2004/11/11 10:35:15 claudio Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -137,6 +137,7 @@ typedef struct {
%}
%token AS ROUTERID HOLDTIME YMIN LISTEN ON FIBUPDATE
+%token RDE EVALUATE IGNORE
%token GROUP NEIGHBOR NETWORK
%token REMOTEAS DESCR LOCALADDR MULTIHOP PASSIVE MAXPREFIX ANNOUNCE
%token ENFORCE NEIGHBORAS CAPABILITIES REFLECTOR DEPEND
@@ -349,6 +350,26 @@ conf_main : AS asnumber {
free($3);
}
| mrtdump
+ | RDE STRING EVALUATE {
+ if (!strcmp($2, "route-age"))
+ conf->flags |= BGPD_FLAG_DECISION_ROUTEAGE;
+ else {
+ yyerror("unknown route decision type");
+ free($2);
+ YYERROR;
+ }
+ free($2);
+ }
+ | RDE STRING IGNORE {
+ if (!strcmp($2, "route-age"))
+ conf->flags &= ~BGPD_FLAG_DECISION_ROUTEAGE;
+ else {
+ yyerror("unknown route decision type");
+ free($2);
+ YYERROR;
+ }
+ free($2);
+ }
;
mrtdump : DUMP STRING inout STRING optnumber {
@@ -1232,10 +1253,12 @@ lookup(char *s)
{ "dump", DUMP},
{ "enforce", ENFORCE},
{ "esp", ESP},
+ { "evaluate", EVALUATE},
{ "fib-update", FIBUPDATE},
{ "from", FROM},
{ "group", GROUP},
{ "holdtime", HOLDTIME},
+ { "ignore", IGNORE},
{ "ike", IKE},
{ "in", IN},
{ "ipsec", IPSEC},
@@ -1265,6 +1288,7 @@ lookup(char *s)
{ "prepend-neighbor", PREPEND_PEER},
{ "prepend-self", PREPEND_SELF},
{ "quick", QUICK},
+ { "rde", RDE},
{ "reject", REJECT},
{ "remote-as", REMOTEAS},
{ "route-collector", ROUTECOLL},