diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-02-01 19:46:06 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-02-01 19:46:06 +0000 |
commit | 6b28dc4d8b23f52cf7773f469198e947187b6251 (patch) | |
tree | bbd458632bd2ceee9f346f0ede02cbdd49e37b23 /usr.sbin/bgpd/config.c | |
parent | 3fd41d6dc00ba0ff9f58cae245b2b0a876dc97b6 (diff) |
Set sane default announce types according to the peer type. For IBGP use
announce all and for EBGP use announce self. OK henning@
Diffstat (limited to 'usr.sbin/bgpd/config.c')
-rw-r--r-- | usr.sbin/bgpd/config.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/config.c b/usr.sbin/bgpd/config.c index 852bfa58013..672b1078794 100644 --- a/usr.sbin/bgpd/config.c +++ b/usr.sbin/bgpd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.25 2004/01/30 23:24:04 henning Exp $ */ +/* $OpenBSD: config.c,v 1.26 2004/02/01 19:46:05 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -56,6 +56,9 @@ merge_config(struct bgpd_config *xconf, struct bgpd_config *conf, for (p = peer_l; p != NULL; p = p->next) { p->conf.ebgp = (p->conf.remote_as != conf->as); + if (p->conf.announce_type == ANNOUNCE_UNDEF) + p->conf.announce_type = p->conf.ebgp == 0 ? + ANNOUNCE_ALL : ANNOUNCE_SELF; if (!p->conf.id) p->conf.id = get_id(p); } |