diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-03-30 06:32:52 -0700 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2015-09-24 15:26:42 +0100 |
commit | 7ef4221c3f85121edb68a6a54ebd6bb167408e47 (patch) | |
tree | fc347b5fa1935a8ef801c3af4b75167af0716934 /lib/workqueue.h | |
parent | 234e5c8d5a35339fb319affb952581bf5abb48a7 (diff) | |
download | quagga-7ef4221c3f85121edb68a6a54ebd6bb167408e47.tar.bz2 quagga-7ef4221c3f85121edb68a6a54ebd6bb167408e47.tar.xz |
bgpd: Fix race in clearing completion
When a peer that is Established goes down, it is moved into the Clearing
state to facilitate clearing of the routes received from the peer - remove
from the RIB, reselect best path, update/delete from Zebra and to other
peers etc. At the end of this, a Clearing_Completed event is generated to
the FSM which will allow the peer to move out of Clearing to Idle.
The issue in the code is that there is a possibility of multiple Clearing
Completed events being generated for a peer, one per AFI/SAFI. Upon the
first such event, the peer would move to Idle. If other events happened
(e.g., new connection got established) before the last Clearing_Completed
event is received, bad things can happen.
Fix to ensure only one Clearing_Completed event is generated.
Signed-off-by: Vivek Venkataraman <vivek@cumulusnetworks.com>
Diffstat (limited to 'lib/workqueue.h')
0 files changed, 0 insertions, 0 deletions