diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-28 17:05:09 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-28 17:05:09 +0000 |
commit | eb6b5c0fcf9982d3d0c22b080dadcf5f00f8cc1b (patch) | |
tree | fac759ab1cf8789d8883a39fa870b02980cefaa0 /usr.sbin | |
parent | e9478ede0fae49df51be819cbe761ba96e0fc622 (diff) |
allow "set metric" as synonym for "set med", from discussion with & ok claudio
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/parse.y | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index 4d2a5bb7f9f..6214224936f 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.126 2004/07/28 15:10:01 henning Exp $ */ +/* $OpenBSD: parse.y,v 1.127 2004/07/28 17:05:08 henning Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -146,7 +146,7 @@ typedef struct { %token QUICK %token FROM TO ANY %token PREFIX PREFIXLEN SOURCEAS TRANSITAS COMMUNITY -%token SET LOCALPREF MED NEXTHOP PREPEND PFTABLE REJECT BLACKHOLE +%token SET LOCALPREF MED METRIC NEXTHOP PREPEND PFTABLE REJECT BLACKHOLE %token ERROR %token IPSEC ESP AH SPI IKE %token <v.string> STRING @@ -1073,6 +1073,10 @@ filter_set_opt : LOCALPREF number { $$.flags = SET_MED; $$.med = $2; } + | METRIC number { /* alias for MED */ + $$.flags = SET_MED; + $$.med = $2; + } | NEXTHOP address { if ($2.af == AF_INET) { $$.flags = SET_NEXTHOP; @@ -1221,6 +1225,7 @@ lookup(char *s) { "max-prefix", MAXPREFIX}, { "md5sig", MD5SIG}, { "med", MED}, + { "metric", METRIC}, { "min", YMIN}, { "multihop", MULTIHOP}, { "neighbor", NEIGHBOR}, |