diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-05-08 18:04:15 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-05-08 18:04:15 +0000 |
commit | b593062d63e67181a24bd26fcad1712f2154772d (patch) | |
tree | 27c315022685577c69150459b220aa477db3e91c /usr.sbin/bgpd | |
parent | 28c7c148d800bbae6bf377af3648493f844624c9 (diff) |
allow for neighbor statements without { parameters } block; everything
can be inherited from the group
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/parse.y | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index f38fc15ec58..3e50393afe1 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.104 2004/05/08 17:40:53 henning Exp $ */ +/* $OpenBSD: parse.y,v 1.105 2004/05/08 18:04:14 henning Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -375,7 +375,7 @@ optnumber : /* empty */ { $$ = 0; } ; neighbor : { curpeer = new_peer(); } - NEIGHBOR addrspec optnl '{' optnl { + NEIGHBOR addrspec { memcpy(&curpeer->conf.remote_addr, &$3.prefix, sizeof(curpeer->conf.remote_addr)); curpeer->conf.remote_masklen = $3.len; @@ -387,7 +387,7 @@ neighbor : { curpeer = new_peer(); } YYERROR; } } - peeropts_l '}' { + peeropts_h { if (curpeer->conf.local_addr.af && curpeer->conf.local_addr.af != curpeer->conf.remote_addr.af) { @@ -433,6 +433,10 @@ groupoptsl : peeropts nl | error nl ; +peeropts_h : '{' optnl peeropts_l '}' + | /* empty */ + ; + peeropts_l : peeropts_l peeroptsl | peeroptsl ; |