From 819bfbb943e2d4adeef147432be808f5c9356196 Mon Sep 17 00:00:00 2001 From: Luc Revardel Date: Wed, 8 Feb 2017 22:29:32 +0100 Subject: [PATCH] Fix bug #50220 (mld6_leavegroup does not send ICMP6_TYPE_MLD, even if last reporter) Signed-off-by: sg --- src/core/ipv6/mld6.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/ipv6/mld6.c b/src/core/ipv6/mld6.c index 1db59af1..0748c61b 100644 --- a/src/core/ipv6/mld6.c +++ b/src/core/ipv6/mld6.c @@ -606,6 +606,11 @@ mld6_send(struct netif *netif, struct mld_group *group, u8_t type) /* Add hop-by-hop headers options: router alert with MLD value. */ ip6_options_add_hbh_ra(p, IP6_NEXTH_ICMP6, IP6_ROUTER_ALERT_VALUE_MLD); + if (type == ICMP6_TYPE_MLR) { + /* Remember we were the last to report */ + group->last_reporter_flag = 1; + } + /* Send the packet out. */ MLD6_STATS_INC(mld6.xmit); ip6_output_if(p, (ip6_addr_isany(src_addr)) ? NULL : src_addr, &(group->group_address),