diff options
author | 2003-12-25 13:17:27 +0000 | |
---|---|---|
committer | 2003-12-25 13:17:27 +0000 | |
commit | 3a4455412ac3fcc43af7a8000a49e655c33fbdc9 (patch) | |
tree | e43e7f5efb90ef1ae08ac755aba4e85885c02872 | |
parent | we need nonblocking connect (diff) | |
download | wireguard-openbsd-3a4455412ac3fcc43af7a8000a49e655c33fbdc9.tar.xz wireguard-openbsd-3a4455412ac3fcc43af7a8000a49e655c33fbdc9.zip |
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.
-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); |