From 172e4d9fa28ddd9b5310b3adca63558f12d8bae9 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 21 Sep 2022 17:13:28 +0300 Subject: bgpd: Stop LLGR thread when deleting a peer and/or GR flags changed Also valid when shutting down a BGP instance. Signed-off-by: Donatas Abraitis --- bgpd/bgpd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 4c151b2d3..2c0d88d64 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -2374,8 +2374,10 @@ void peer_nsf_stop(struct peer *peer) UNSET_FLAG(peer->sflags, PEER_STATUS_NSF_WAIT); UNSET_FLAG(peer->sflags, PEER_STATUS_NSF_MODE); - FOREACH_AFI_SAFI_NSF (afi, safi) + FOREACH_AFI_SAFI_NSF (afi, safi) { peer->nsf[afi][safi] = 0; + THREAD_OFF(peer->t_llgr_stale[afi][safi]); + } if (peer->t_gr_restart) { THREAD_OFF(peer->t_gr_restart); -- cgit v1.2.3