summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2006-02-08 12:36:30 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2006-02-08 12:36:30 +0000
commit246dc3fd7bb698e2df70c9a080832eef75ccdee9 (patch)
tree6748e041374f0b78a79ee3a4ec9087ea7d917eb3
parent010d7e3710c1e834978649e86d8b6a3a4c3131f5 (diff)
fix logic both in the decision when to re-init the capabilities negotiation
structures
-rw-r--r--usr.sbin/bgpd/session.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index cfaf747754c..61e34b4c7cb 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.243 2006/01/24 10:08:16 henning Exp $ */
+/* $OpenBSD: session.c,v 1.244 2006/02/08 12:36:29 henning Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
@@ -873,7 +873,7 @@ change_state(struct peer *peer, enum session_state state,
peer->IdleHoldTime < MAX_IDLE_HOLD/2)
peer->IdleHoldTime *= 2;
}
- if (event != EVNT_RCVD_OPEN) { /* capa negotiation */
+ if (peer->state == STATE_NONE || peer->state == STATE_ESTABLISHED) {
/* initialize capability negotiation structures */
memcpy(&peer->capa.ann, &peer->conf.capabilities,
sizeof(peer->capa.ann));