]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: IGMPv3 leave not deleting group entry
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 11 Jul 2016 19:54:37 +0000 (15:54 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 12 Jul 2016 14:46:00 +0000 (10:46 -0400)
After sending a IGMPv3 exclude report for a multicast address
with 0 sources, send an include report for the same group and also 0
sources.  This should cause IGMP to GS query and age/delete
the entry.

This fix addresses this issue.

Ticket: CM-11685
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_igmpv3.c

index d198ec92bec3e1b3d54699a15757effa2de9c7ea..0a6b6b37953c66c61cd87c440a7f7f5a261d0614 100644 (file)
@@ -543,6 +543,7 @@ static void allow(struct igmp_sock *igmp, struct in_addr from,
                  struct in_addr group_addr,
                  int num_sources, struct in_addr *sources)
 {
+  struct igmp_source *source;
   struct igmp_group *group;
   int    i;
 
@@ -554,7 +555,6 @@ static void allow(struct igmp_sock *igmp, struct in_addr from,
 
   /* scan received sources */
   for (i = 0; i < num_sources; ++i) {
-    struct igmp_source *source;
     struct in_addr     *src_addr;
 
     src_addr = sources + i;
@@ -577,6 +577,17 @@ static void allow(struct igmp_sock *igmp, struct in_addr from,
     igmp_source_reset_gmi(igmp, group, source);
 
   } /* scan received sources */
+
+  if ((num_sources == 0) &&
+      (group->group_filtermode_isexcl) &&
+      (listcount (group->group_source_list) == 1))
+    {
+      struct in_addr star = { .s_addr = INADDR_ANY };
+
+      source = igmp_find_source_by_addr (group, star);
+      if (source)
+       igmp_source_reset_gmi (igmp, group, source);
+    }
 }
 
 void igmpv3_report_isin(struct igmp_sock *igmp, struct in_addr from,