summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2022-09-21 16:13:28 +0200
committerDonatas Abraitis <donatas@opensourcerouting.org>2022-09-21 16:13:28 +0200
commit172e4d9fa28ddd9b5310b3adca63558f12d8bae9 (patch)
tree577289fde891aa0c28b008919eb0e20683f35ec3
parentMerge pull request #11802 from AbhishekNR/ttable_pim_state (diff)
downloadfrr-172e4d9fa28ddd9b5310b3adca63558f12d8bae9.tar.xz
frr-172e4d9fa28ddd9b5310b3adca63558f12d8bae9.zip
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 <donatas@opensourcerouting.org>
-rw-r--r--bgpd/bgpd.c4
1 files changed, 3 insertions, 1 deletions
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);