diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-06-22 03:44:27 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-06-22 03:44:27 +0000 |
commit | c2d8a7a969288b224172afc470a2d204e2d754e5 (patch) | |
tree | f7acbb81be730bc772cd1525fed2beb3133cf34e | |
parent | 731404f18e64fdbbeeced7272fc2505de9744c1f (diff) |
Templates with unknown AS where always configured as ebgp peers even if
they were ibgp ones. OK henning@
-rw-r--r-- | usr.sbin/bgpd/session.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index f2f334107dd..544066d5f37 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.177 2004/06/22 03:17:01 henning Exp $ */ +/* $OpenBSD: session.c,v 1.178 2004/06/22 03:44:26 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -1617,8 +1617,10 @@ parse_open(struct peer *peer) p += sizeof(as); /* if remote-as is zero and it's a cloned neighbor, accept any */ - if (peer->conf.cloned && !peer->conf.remote_as) + if (peer->conf.cloned && !peer->conf.remote_as) { peer->conf.remote_as = ntohs(as); + peer->conf.ebgp = (peer->conf.remote_as != conf->as); + } if (peer->conf.remote_as != ntohs(as)) { log_peer_warnx(&peer->conf, "peer sent wrong AS %u", ntohs(as)); |