aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-09-26 06:51:39 -0700
committerDamjan Marion <dmarion@me.com>2018-10-01 09:42:16 +0000
commit21064cec96b833c78505022fc29f25bed9f2fe9a (patch)
tree34857e87676b0b847815605f05fcd1f9296f6012 /src
parentbc0c8fe6ff8a26cb2c4203f8e62af97d6589c1ae (diff)
IGMP: handle (*,G) report with no source addresses
Change-Id: I363370b9d4a27b992bad55c48fc930a2fbea2165 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/igmp/igmp_report.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/plugins/igmp/igmp_report.c b/src/plugins/igmp/igmp_report.c
index 2caa9361b70..fc8155d59e1 100644
--- a/src/plugins/igmp/igmp_report.c
+++ b/src/plugins/igmp/igmp_report.c
@@ -32,15 +32,21 @@ igmp_group_mk_source_list (const igmp_membership_group_v3_t * r)
n = clib_net_to_host_u16 (r->n_src_addresses);
if (0 == n)
- return (NULL);
-
- vec_validate (srcs, n - 1);
- s = r->src_addresses;
-
- for (ii = 0; ii < n; ii++)
{
- srcs[ii].ip4 = *s;
- s++;
+ /* a (*,G) join has no source address specified */
+ vec_validate (srcs, 0);
+ srcs[0].ip4.as_u32 = 0;
+ }
+ else
+ {
+ vec_validate (srcs, n - 1);
+ s = r->src_addresses;
+
+ for (ii = 0; ii < n; ii++)
+ {
+ srcs[ii].ip4 = *s;
+ s++;
+ }
}
return (srcs);