diff options
Diffstat (limited to 'usr.sbin/bgpd/parse.y')
-rw-r--r-- | usr.sbin/bgpd/parse.y | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index 8fe1c32ed9d..adb8f4a1115 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.170 2005/07/28 20:01:21 henning Exp $ */ +/* $OpenBSD: parse.y,v 1.171 2005/08/09 20:27:25 claudio Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -142,7 +142,7 @@ typedef struct { %} %token AS ROUTERID HOLDTIME YMIN LISTEN ON FIBUPDATE -%token RDE EVALUATE IGNORE +%token RDE EVALUATE IGNORE COMPARE %token GROUP NEIGHBOR NETWORK %token REMOTEAS DESCR LOCALADDR MULTIHOP PASSIVE MAXPREFIX ANNOUNCE %token ENFORCE NEIGHBORAS CAPABILITIES REFLECTOR DEPEND @@ -415,6 +415,19 @@ conf_main : AS asnumber { } free($2); } + | RDE MED COMPARE STRING { + if (!strcmp($4, "always")) + conf->flags |= BGPD_FLAG_DECISION_MED_ALWAYS; + else if (!strcmp($4, "strict")) + conf->flags &= ~BGPD_FLAG_DECISION_MED_ALWAYS; + else { + yyerror("rde med compare: " + "unknown setting \"%s\"", $4); + free($4); + YYERROR; + } + free($4); + } ; mrtdump : DUMP STRING inout STRING optnumber { @@ -1464,6 +1477,7 @@ lookup(char *s) { "blackhole", BLACKHOLE}, { "capabilities", CAPABILITIES}, { "community", COMMUNITY}, + { "compare", COMPARE}, { "connected", CONNECTED}, { "deny", DENY}, { "depend", DEPEND}, |