diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-25 13:17:28 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-25 13:17:28 +0000 |
commit | e35537971479407bf35b7b4f30e00482cb27ccb5 (patch) | |
tree | 1c1587699c91c63aab372807bd96f6fd63ed4694 /usr.sbin/bgpd/session.c | |
parent | d8e1c03504634bb031161260263cfd92aaf19af4 (diff) |
small gotcha in the FSM:
if we're in state ACTIVE and get an TIMER_CONNRETRY event, we need to
change the state to CONNECT _before_ we call session_connect() to attempt
a connect, as session_connect can generate events that caus further state
changes.
as far as i saw that it only causes a bit confusion for sessions dangling
between CONNECT and ACTIVE all the time without causing real trouble, but bugs
are bugs, right.
Diffstat (limited to 'usr.sbin/bgpd/session.c')
-rw-r--r-- | usr.sbin/bgpd/session.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index 32754a10dfc..4d7028d8494 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.40 2003/12/25 13:13:18 henning Exp $ */ +/* $OpenBSD: session.c,v 1.41 2003/12/25 13:17:27 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -383,8 +383,8 @@ bgp_fsm(struct peer *peer, enum session_events event) case EVNT_TIMER_CONNRETRY: peer->ConnectRetryTimer = time(NULL) + peer->holdtime; - session_connect(peer); change_state(peer, STATE_CONNECT, event); + session_connect(peer); break; default: change_state(peer, STATE_IDLE, event); |