]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: When loosing *,G igmp report notify S,G too
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 18 Apr 2017 13:01:00 +0000 (09:01 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 20 Apr 2017 19:57:00 +0000 (15:57 -0400)
When we have a S,G that was created due to the *,G IGMP
report going away, safely remove the S,G as well.

Ticket: CM-15838
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
pimd/pim_ifchannel.c

index fc84a5c2fe57e6afb8580296d674906363ca6fec..b19118f3ac18c10c205abe8cdcc00433ac22deb8 100644 (file)
@@ -1054,9 +1054,9 @@ void pim_ifchannel_local_membership_del(struct interface *ifp,
     {
       struct pim_upstream *up = pim_upstream_find (sg);
       struct pim_upstream *child;
-      struct listnode *up_node;
+      struct listnode *up_node, *up_nnode;
 
-      for (ALL_LIST_ELEMENTS_RO (up->sources, up_node, child))
+      for (ALL_LIST_ELEMENTS (up->sources, up_node, up_nnode, child))
         {
          struct channel_oil *c_oil = child->channel_oil;
          struct pim_ifchannel *chchannel = pim_ifchannel_find (ifp, &child->sg);
@@ -1077,6 +1077,9 @@ void pim_ifchannel_local_membership_del(struct interface *ifp,
           */
          if (!chchannel && c_oil && c_oil->oil.mfcc_ttls[pim_ifp->mroute_vif_index])
             pim_channel_del_oif (c_oil, ifp, PIM_OIF_FLAG_PROTO_STAR);
+
+          if (c_oil->oil_size == 0)
+            pim_upstream_del (child, __PRETTY_FUNCTION__);
         }
     }
   delete_on_noinfo(ch);