summaryrefslogtreecommitdiff
path: root/pimd/pim_ifchannel.c
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2021-11-22 08:30:18 -0500
committerGitHub <noreply@github.com>2021-11-22 08:30:18 -0500
commitcfbf74a9a13493044fb963eaee41360f31edca46 (patch)
tree07185a9ffc592c1e2c1988a570628c0d39f90712 /pimd/pim_ifchannel.c
parente59d8139ae7fc7d8998476baed58edea0cd52892 (diff)
parent5e0105ff80eb5e7b60cd1cdbe16aabb9f8b20463 (diff)
Merge pull request #10088 from opensourcerouting/pim-forward-stop
pimd: fix stale forwarding entries left around after join goes away
Diffstat (limited to 'pimd/pim_ifchannel.c')
-rw-r--r--pimd/pim_ifchannel.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c
index 86f897aed1..3163f7f548 100644
--- a/pimd/pim_ifchannel.c
+++ b/pimd/pim_ifchannel.c
@@ -651,18 +651,17 @@ struct pim_ifchannel *pim_ifchannel_add(struct interface *ifp,
return ch;
}
-static void ifjoin_to_noinfo(struct pim_ifchannel *ch, bool ch_del)
+static void ifjoin_to_noinfo(struct pim_ifchannel *ch)
{
- pim_forward_stop(ch, !ch_del);
pim_ifchannel_ifjoin_switch(__func__, ch, PIM_IFJOIN_NOINFO);
+ pim_forward_stop(ch);
if (ch->upstream)
PIM_UPSTREAM_FLAG_UNSET_SRC_PIM(ch->upstream->flags);
PIM_IF_FLAG_UNSET_PROTO_PIM(ch->flags);
- if (ch_del)
- delete_on_noinfo(ch);
+ delete_on_noinfo(ch);
}
static int on_ifjoin_expiry_timer(struct thread *t)
@@ -675,7 +674,7 @@ static int on_ifjoin_expiry_timer(struct thread *t)
zlog_debug("%s: ifchannel %s expiry timer", __func__,
ch->sg_str);
- ifjoin_to_noinfo(ch, true);
+ ifjoin_to_noinfo(ch);
/* ch may have been deleted */
return 0;
@@ -714,7 +713,7 @@ static int on_ifjoin_prune_pending_timer(struct thread *t)
&rpf, ch->upstream, 0);
}
- ifjoin_to_noinfo(ch, true);
+ ifjoin_to_noinfo(ch);
} else {
/* If SGRpt flag is set on ifchannel, Trigger SGRpt
* message on RP path upon prune timer expiry.