X-Git-Url: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=blobdiff_plain;f=src%2Fplugins%2Figmp%2Figmp_report.c;h=7c08f3421990062fb6befb9e7760f8810b6e0757;hp=328b890c15ec513791ac8a039e8e59e68501dea1;hb=97748ca;hpb=947ea6222dad1ef04595c34273e9231395aef443 diff --git a/src/plugins/igmp/igmp_report.c b/src/plugins/igmp/igmp_report.c index 328b890c15e..7c08f342199 100644 --- a/src/plugins/igmp/igmp_report.c +++ b/src/plugins/igmp/igmp_report.c @@ -25,18 +25,28 @@ igmp_group_mk_source_list (const igmp_membership_group_v3_t * r) const ip4_address_t *s; u16 ii, n; + /* + * we validated this packet when we accepted it in the DP, so + * this number is safe to use + */ 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); @@ -97,7 +107,7 @@ igmp_handle_group_block (igmp_config_t * config, { igmp_src_t *src; /* - * sned a group+source specific query + * send a group+source specific query */ igmp_pkt_build_query_init (&bq, config->sw_if_index); igmp_pkt_query_v3_add_group (&bq, group, srcs); @@ -172,6 +182,10 @@ igmp_handle_report (const igmp_report_args_t * args) return; } + /* + * we validated this packet when we accepted it in the DP, so + * this number is safe to use + */ n_groups = clib_net_to_host_u16 (args->report[0].n_groups); igmp_group = args->report[0].groups; @@ -182,6 +196,8 @@ igmp_handle_report (const igmp_report_args_t * args) igmp_group = group_cptr (igmp_group, igmp_membership_group_v3_length (igmp_group)); } + + igmp_proxy_device_merge_config (config, 0); } /*