diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2023-11-15 16:23:56 -0500 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-11-21 12:41:18 -0500 | 
| commit | 7bf3c2fb195f34382e1bf00ed2c91310a1dc9f86 (patch) | |
| tree | 6a51b8c288cedc8f657bab22b12c3ec58db378c1 /bgpd/bgp_fsm.c | |
| parent | 0b81a7524d2056b53ea86aab8095f528d645592d (diff) | |
bgpd: On shutdown do not create a workqueue for the self peer
When bgp is shutting down, it calls bgp_fsm_change_status
on everything including a self peer, which goes through
and cleans the tables of the self peer data structures
as if it's a real peer.  Add a bit of code to just
not do the work at all.  This allows unlocks to flow
a bit further and for the self peer to be deleted
on shutdown.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgp_fsm.c')
| -rw-r--r-- | bgpd/bgp_fsm.c | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index aa806b8dc1..caa1131397 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -1236,7 +1236,7 @@ void bgp_fsm_change_status(struct peer_connection *connection,  	/* Transition into Clearing or Deleted must /always/ clear all routes..  	 * (and must do so before actually changing into Deleted..  	 */ -	if (status >= Clearing) { +	if (status >= Clearing && peer != bgp->peer_self) {  		bgp_clear_route_all(peer);  		/* If no route was queued for the clear-node processing,  | 
