]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: Fix igmp isex_excl
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 29 Jun 2016 19:07:51 +0000 (15:07 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 29 Jun 2016 19:23:01 +0000 (15:23 -0400)
When we receive an igmpv3 group report that has
an implied *,g make sure that we look at
the source for the g and handle it appropriately

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

index 670054df5acf49045addbcb0f2acd618f05a39f2..d198ec92bec3e1b3d54699a15757effa2de9c7ea 100644 (file)
@@ -592,6 +592,7 @@ void igmpv3_report_isin(struct igmp_sock *igmp, struct in_addr from,
 static void isex_excl(struct igmp_group *group,
                      int num_sources, struct in_addr *sources)
 {
+  struct igmp_source *source;
   int     i;
 
   /* EXCLUDE mode */
@@ -602,7 +603,6 @@ static void isex_excl(struct igmp_group *group,
 
   /* scan received sources (A) */
   for (i = 0; i < num_sources; ++i) {
-    struct igmp_source *source;
     struct in_addr     *src_addr;
 
     src_addr = sources + i;
@@ -627,6 +627,20 @@ static void isex_excl(struct igmp_group *group,
 
   } /* scan received sources */
 
+  /*
+   * If we are in isexcl mode and num_sources == 0
+   * than that means we have a *,g entry that
+   * needs to be handled
+   */
+  if (group->group_filtermode_isexcl && num_sources == 0)
+    {
+       struct in_addr star = { .s_addr = INADDR_ANY };
+       source = igmp_find_source_by_addr (group, star);
+       if (source)
+         IGMP_SOURCE_DONT_DELETE(source->source_flags);
+       igmp_source_reset_gmi (group->group_igmp_sock, group, source);
+    }
+
   /* E.5: delete all sources marked with deletion flag: (X-A) and (Y-A) */
   source_delete_by_flag(group->group_source_list);
 }