]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: In Prune Pending state, the holdtime change is not taking effect 9083/head
authorgithub login name <ranjany@vmware.com>
Mon, 19 Jul 2021 07:46:00 +0000 (00:46 -0700)
committergithub login name <ranjany@vmware.com>
Mon, 19 Jul 2021 08:01:21 +0000 (01:01 -0700)
Problem Statement:
In Prune pending state, when Join is received, and there is hold timer change
the Expiry timer is not getting updated with new Hold timer.

Root Cause:
When thread_add_timer function is called and the thread is already in the list
the thread api just returns, it does not modify the timer value.
So when we want to change the timer, we need to first call THREAD_OFF and then
call thread_add_timer.
The Expiry timer thread is not cancelled in PIM_IFJOIN_PRUNE_PENDING state,
therefore the timer change is not taking effect.

Fix:
Call THREAD_OFF in that flow.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
pimd/pim_ifchannel.c

index 9ee06edfc191cb80d7024e0a6c4276014a4ca10b..7652c15d624efcda3c97382aae1e649394ec4bc5 100644 (file)
@@ -1021,6 +1021,7 @@ void pim_ifchannel_join_add(struct interface *ifp, struct in_addr neigh_addr,
                        if (remain > holdtime)
                                return;
                }
+               THREAD_OFF(ch->t_ifjoin_expiry_timer);
 
                break;
        case PIM_IFJOIN_PRUNE_TMP: