From 539fba1a52eeb78de4cf6129d4d8ed0613a25e2c Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 29 Jun 2016 15:07:51 -0400 Subject: [PATCH] pimd: Fix igmp isex_excl 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 --- pimd/pim_igmpv3.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pimd/pim_igmpv3.c b/pimd/pim_igmpv3.c index 670054df5a..d198ec92be 100644 --- a/pimd/pim_igmpv3.c +++ b/pimd/pim_igmpv3.c @@ -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); } -- 2.39.5