]> git.puffer.fish Git - matthieu/frr.git/commit
When a peer that is Established goes down, it is moved into the Clearing
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 01:04:12 +0000 (18:04 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 01:04:12 +0000 (18:04 -0700)
commitdc83d712b14805ccb03101c655a0f377c4dfe6f5
tree53f77d0162d551e1fe563573639ae76659d54403
parentd4a7a753a829de6b379740304d47a02a5fb3dcf2
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.
bgpd/bgp_fsm.c
bgpd/bgp_route.c