summaryrefslogtreecommitdiffstats
path: root/pimd/pim_upstream.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2022-03-15 13:35:30 +0100
committerGitHub <noreply@github.com>2022-03-15 13:35:30 +0100
commitbaa57b728271da65e1c766b372866b7955927ce9 (patch)
tree990fc1445d66a3ba0fc2936bc881b02bb2fded22 /pimd/pim_upstream.c
parentMerge pull request #10693 from anlancs/bgpd-add-check-ns (diff)
parentpimd: Ensure timers are stopped on instance shutdown (diff)
downloadfrr-baa57b728271da65e1c766b372866b7955927ce9.tar.xz
frr-baa57b728271da65e1c766b372866b7955927ce9.zip
Merge pull request #10583 from donaldsharp/pim_upstream_timers
pimd: Ensure timers are stopped on instance shutdown
Diffstat (limited to 'pimd/pim_upstream.c')
-rw-r--r--pimd/pim_upstream.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c
index 24833f5a6..571117ac0 100644
--- a/pimd/pim_upstream.c
+++ b/pimd/pim_upstream.c
@@ -178,6 +178,14 @@ static void upstream_channel_oil_detach(struct pim_upstream *up)
}
+static void pim_upstream_timers_stop(struct pim_upstream *up)
+{
+ THREAD_OFF(up->t_ka_timer);
+ THREAD_OFF(up->t_rs_timer);
+ THREAD_OFF(up->t_msdp_reg_timer);
+ THREAD_OFF(up->t_join_timer);
+}
+
struct pim_upstream *pim_upstream_del(struct pim_instance *pim,
struct pim_upstream *up, const char *name)
{
@@ -207,9 +215,7 @@ struct pim_upstream *pim_upstream_del(struct pim_instance *pim,
if (pim_up_mlag_is_local(up))
pim_mlag_up_local_del(pim, up);
- THREAD_OFF(up->t_ka_timer);
- THREAD_OFF(up->t_rs_timer);
- THREAD_OFF(up->t_msdp_reg_timer);
+ pim_upstream_timers_stop(up);
if (up->join_state == PIM_UPSTREAM_JOINED) {
pim_jp_agg_single_upstream_send(&up->rpf, up, 0);
@@ -1945,6 +1951,7 @@ void pim_upstream_terminate(struct pim_instance *pim)
while ((up = rb_pim_upstream_first(&pim->upstream_head))) {
pim_upstream_del(pim, up, __func__);
+ pim_upstream_timers_stop(up);
}
rb_pim_upstream_fini(&pim->upstream_head);