From cf575d09758a5469431c78bdae16c9cd1ad9bba5 Mon Sep 17 00:00:00 2001 From: saravanank Date: Mon, 23 Mar 2020 19:57:17 -0700 Subject: [PATCH] pimd: Reg Suppression expiry has to account for couldreg->false while in prune Problem: This happened in once in a while during testing the scenario multiple times. When regstop timer expire and at that point if rpf interface doesn't exist, the register state for the upstream gets struck in reg-prune state indefinitely. This will not recover even when rpf comes back and traffic resumed because register state is struck on prune. RCA: Reg suppression expiry is keeping reg state unchanged when iif is absent. Fix: When iif is absent during reg suppression expiry, treat it as couldreg becoming false and move it NO_INFO state. Signed-off-by: Saravanan K --- pimd/pim_upstream.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index efa58c1b1f..1bf0cfc37e 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -1697,10 +1697,12 @@ static int pim_upstream_register_stop_timer(struct thread *t) case PIM_REG_JOIN: break; case PIM_REG_PRUNE: + /* This is equalent to Couldreg -> False */ if (!up->rpf.source_nexthop.interface) { if (PIM_DEBUG_PIM_TRACE) zlog_debug("%s: up %s RPF is not present", __func__, up->sg_str); + up->reg_state = PIM_REG_NOINFO; return 0; }