From eb6b5c0fcf9982d3d0c22b080dadcf5f00f8cc1b Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Wed, 28 Jul 2004 17:05:09 +0000 Subject: allow "set metric" as synonym for "set med", from discussion with & ok claudio --- usr.sbin/bgpd/parse.y | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'usr.sbin') 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 @@ -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 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}, -- cgit v1.2.3