Skip to content

Commit

Permalink
pim6d: Clear channel_oil on prune
Browse files Browse the repository at this point in the history
Receiver---LHR---RP

Problem:
In LHR, ipv6 pim state remains after MLD prune received.

Root Cause:
When LHR receives join, it creates (*,G) channel oil with
oil_ref_count = 2. The channel_oil is used by gm_sg sg->oil
and upstream->channel_oil.

When LHR receives prune, currently upstream->channel_oil is
deleted and gm_sg sg->oil still present. Due to this channel_oil
is still present with oil_ref_count = 1

Fix:
When LHR receives prune, upstream->channel_oil and pim_sg sg->oil
needs to be deleted.

Issue: FRRouting#11249

Signed-off-by: Sarita Patra <[email protected]>
  • Loading branch information
patrasar committed Jun 5, 2023
1 parent 1bafbcb commit cb809c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions pimd/pim_igmpv3.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ void igmp_source_delete(struct gm_source *source)

source_timer_off(group, source);
igmp_source_forward_stop(source);
source->source_channel_oil = NULL;

/* sanity check that forwarding has been disabled */
if (IGMP_SOURCE_TEST_FORWARDING(source->source_flags)) {
Expand All @@ -371,8 +372,6 @@ void igmp_source_delete(struct gm_source *source)
/* warning only */
}

source_channel_oil_detach(source);

/*
notice that listnode_delete() can't be moved
into igmp_source_free() because the later is
Expand Down
2 changes: 2 additions & 0 deletions pimd/pim_tib.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,6 @@ void tib_sg_gm_prune(struct pim_instance *pim, pim_sgaddr sg,
per-interface (S,G) state.
*/
pim_ifchannel_local_membership_del(oif, &sg);

pim_channel_oil_del(*oilp, __func__);
}

0 comments on commit cb809c0

Please sign in to comment.