]> git.puffer.fish Git - mirror/frr.git/commitdiff
pim6d: Clear channel_oil on prune
authorSarita Patra <saritap@vmware.com>
Thu, 7 Jul 2022 15:12:10 +0000 (08:12 -0700)
committerSarita Patra <saritap@vmware.com>
Mon, 5 Jun 2023 05:23:56 +0000 (22:23 -0700)
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: #11249

Signed-off-by: Sarita Patra <saritap@vmware.com>
pimd/pim_igmpv3.c
pimd/pim_tib.c

index 15078dd1ecd2bde09039315422bcb0db74baa0d3..96f97f1d1272d14f17ac684717936e6d80ecd80e 100644 (file)
@@ -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)) {
@@ -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
index 6ffea868d80490c76a1a8f24ebc13e19e17776f1..4081786c1e49c4109b76b31ff0906c60e23fe1fd 100644 (file)
@@ -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__);
 }