From 2711d7af9f4fb85c8ad44728fc7e297ebf38a0f7 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 28 Jan 2022 11:17:53 -0500 Subject: [PATCH] pimd: Only remove bsr NHT if we actually have tracked something I'm now seeing in my log file: 2022/01/28 11:20:05 PIM: [Q0PZ7-QBBN3] attempting to delete nonexistent NHT BSR entry 0.0.0.0 2022/01/28 11:20:05 PIM: [Q0PZ7-QBBN3] attempting to delete nonexistent NHT BSR entry 0.0.0.0 2022/01/28 11:20:06 PIM: [Q0PZ7-QBBN3] attempting to delete nonexistent NHT BSR entry 0.0.0.0 When I run pimd. Looking at the code there are 3 places where pim_bsm.c removes the NHT BSR tracking. In 2 of them the code ensures that the address is already setup in 1 place it is not. Fix. Signed-off-by: Donald Sharp (cherry picked from commit 2d51f27f028412ad089ff1f910f6489eb917631d) --- pimd/pim_bsm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pimd/pim_bsm.c b/pimd/pim_bsm.c index 238c19d2cc..cd50cdd678 100644 --- a/pimd/pim_bsm.c +++ b/pimd/pim_bsm.c @@ -171,7 +171,8 @@ static int pim_on_bs_timer(struct thread *t) zlog_debug("%s: Bootstrap Timer expired for scope: %d", __func__, scope->sz_id); - pim_nht_bsr_del(scope->pim, scope->current_bsr); + if (scope->current_bsr.s_addr) + pim_nht_bsr_del(scope->pim, scope->current_bsr); /* Reset scope zone data */ scope->accept_nofwd_bsm = false; -- 2.39.5