diff options
author | Chris Hall <GMCH@hestia.halldom.com> | 2010-09-10 17:52:17 +0100 |
---|---|---|
committer | Chris Hall <GMCH@hestia.halldom.com> | 2010-09-10 17:52:17 +0100 |
commit | 0cadbd1f2cb40f8fb46c0fcc1e1732dc4c519850 (patch) | |
tree | 04b1bf260e699fe6290d44ff2f7dc1f691042a1c /bgpd/bgp_fsm.c | |
parent | 5742d229c2dfe86e626cf9287f99ff7f10673c34 (diff) | |
download | quagga-ex07.tar.bz2 quagga-ex07.tar.xz |
Fix bug in NOTIFICATION handling before FSM reaches Established state.ex07
Change removes the setting of session->active to false which was being
done before a NOTIFICATION message is sent. This flag should remain
true when the session is not being stopped -- which is the case if
a NOTIFICATION is sent before Established state is reached.
Effect of this bug was to trip up the accept() side of the session,
bringing bgpd down on an assert().
This bug may be triggered by a peer that accepts a connection and then
remains silent, for whatever reason -- causing bgpd to issue an
HoldTimer Expired NOTIFICATION.
Version advanced to 0.99.15ex07.
Other changes purely cosmetic -- eg changing some 'int' to 'bool',
and a few small documentation edits.
Diffstat (limited to 'bgpd/bgp_fsm.c')
-rw-r--r-- | bgpd/bgp_fsm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index b1c085bd..3ce8cc19 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -2146,7 +2146,11 @@ bgp_fsm_catch(bgp_connection connection, bgp_fsm_state_t next_state) * * The state transition stuff looks after timers. In particular an error * in Connect/Active states leaves the ConnectRetryTimer running. + * + * However, in any event, no longer require any Keepalive. */ + qtimer_unset(connection->keepalive_timer) ; + if ((send_notification != NULL) && bgp_connection_part_close(connection)) { /* If not changing to stopping, we hold in the current state until @@ -2155,9 +2159,6 @@ bgp_fsm_catch(bgp_connection connection, bgp_fsm_state_t next_state) if (next_state != bgp_fsm_sStopping) next_state = connection->state ; - /* Make sure that cannot pop out a Keepalive ! */ - qtimer_unset(connection->keepalive_timer) ; - /* Write the message */ bgp_msg_write_notification(connection, send_notification) ; |