summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bgpd/parse.y')
-rw-r--r--usr.sbin/bgpd/parse.y18
1 files changed, 16 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index b47d259100c..77feafffe5b 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.164 2005/06/09 15:32:03 claudio Exp $ */
+/* $OpenBSD: parse.y,v 1.165 2005/06/29 09:43:25 claudio Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -153,7 +153,7 @@ typedef struct {
%token CONNECTED STATIC
%token PREFIX PREFIXLEN SOURCEAS TRANSITAS COMMUNITY
%token SET LOCALPREF MED METRIC NEXTHOP REJECT BLACKHOLE NOMODIFY
-%token PREPEND_SELF PREPEND_PEER PFTABLE WEIGHT
+%token PREPEND_SELF PREPEND_PEER PFTABLE WEIGHT RTLABEL
%token ERROR
%token IPSEC ESP AH SPI IKE
%token <v.string> STRING
@@ -1357,6 +1357,19 @@ filter_set_opt : LOCALPREF number {
}
free($2);
}
+ | RTLABEL string {
+ if (($$ = calloc(1, sizeof(struct filter_set))) == NULL)
+ fatal(NULL);
+ $$->type = ACTION_RTLABEL;
+ if (strlcpy($$->action.rtlabel, $2,
+ sizeof($$->action.rtlabel)) >=
+ sizeof($$->action.rtlabel)) {
+ yyerror("rtlabel name too long");
+ free($2);
+ YYERROR;
+ }
+ free($2);
+ }
| COMMUNITY STRING {
if (($$ = calloc(1, sizeof(struct filter_set))) == NULL)
fatal(NULL);
@@ -1492,6 +1505,7 @@ lookup(char *s)
{ "route-collector", ROUTECOLL},
{ "route-reflector", REFLECTOR},
{ "router-id", ROUTERID},
+ { "rtlabel", RTLABEL},
{ "set", SET},
{ "source-as", SOURCEAS},
{ "spi", SPI},