From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hangbin Liu Subject: [PATCHv2 net 0/2] multicast: init as INCLUDE when join SSM INCLUDE group Date: Tue, 10 Jul 2018 22:41:25 +0800 Message-ID: <1531233687-28744-1-git-send-email-liuhangbin@gmail.com> References: <1528871551-17879-1-git-send-email-liuhangbin@gmail.com> Cc: David Miller , Stefano Brivio , Paolo Abeni , Daniel Borkmann , WANG Cong , YOSHIFUJI Hideaki , Flavio Leitner , Hangbin Liu To: netdev@vger.kernel.org Return-path: Received: from mail-pg1-f195.google.com ([209.85.215.195]:37075 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933377AbeGJOmE (ORCPT ); Tue, 10 Jul 2018 10:42:04 -0400 Received: by mail-pg1-f195.google.com with SMTP id n15-v6so2075474pgv.4 for ; Tue, 10 Jul 2018 07:42:03 -0700 (PDT) In-Reply-To: <1528871551-17879-1-git-send-email-liuhangbin@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: Based on RFC3376 5.1 and RFC3810 6.1, we should init as INCLUDE when join SSM INCLUDE group. In my first version I only clear the group change record. But this is not enough as when a new group join, it will init as EXCLUDE and trigger an filter mode change in ip/ip6_mc_add_src(), which will clear all source addresses' sf_crcount. This will prevent early joined address sending state change records if multi source addresses joined at the same time. In this v2 patchset, I fixed it by directly initializing the mode to INCLUDE for SSM JOIN_SOURCE_GROUP. I also split the original patch into two separated patches for IPv4 and IPv6. Test: test by myself and customer. Hangbin Liu (2): ipv4/igmp: init group mode as INCLUDE when join source group ipv6/mcast: init as INCLUDE when join SSM INCLUDE group include/linux/igmp.h | 2 ++ include/net/ipv6.h | 2 ++ net/ipv4/igmp.c | 58 +++++++++++++++++++++++++++++++------------ net/ipv4/ip_sockglue.c | 4 +-- net/ipv6/ipv6_sockglue.c | 5 ++-- net/ipv6/mcast.c | 64 ++++++++++++++++++++++++++++++++++-------------- 6 files changed, 96 insertions(+), 39 deletions(-) -- 2.5.5