diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-03-18 19:41:42 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-03-18 19:41:42 +0000 |
commit | 22585be56620390cf56bc0b4e0afb83c85699166 (patch) | |
tree | 9dbcd9661824da793d0e3a4f63611016e08a29c2 /usr.sbin/bgpd/parse.y | |
parent | ec5c1b1b77e79719850becc98cfb943733fd785f (diff) |
Introduce local_as in the peer config. This allows per peer local AS and
simplifies some code because it is possible to get the local AS from the
peer struct. Local AS needs more patching to work correctly though.
OK henning@
Diffstat (limited to 'usr.sbin/bgpd/parse.y')
-rw-r--r-- | usr.sbin/bgpd/parse.y | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index ad30192cb36..ebebd8613df 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.219 2009/02/16 18:08:32 sthen Exp $ */ +/* $OpenBSD: parse.y,v 1.220 2009/03/18 19:41:41 claudio Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -2454,6 +2454,8 @@ alloc_peer(void) p->conf.capabilities.refresh = 1; p->conf.capabilities.restart = 0; p->conf.capabilities.as4byte = 0; + p->conf.local_as = conf->as; + p->conf.local_short_as = conf->short_as; p->conf.softreconfig_in = 1; p->conf.softreconfig_out = 1; @@ -2476,6 +2478,8 @@ new_peer(void) sizeof(p->conf.descr)) >= sizeof(p->conf.descr)) fatalx("new_peer descr strlcpy"); p->conf.groupid = curgroup->conf.id; + p->conf.local_as = curgroup->conf.local_as; + p->conf.local_short_as = curgroup->conf.local_short_as; } p->next = NULL; |