From patchwork Tue May 9 23:59:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cong Wang X-Patchwork-Id: 760370 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3wMxFl4ttmz9ryb for ; Wed, 10 May 2017 10:00:27 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="eQnn5eH7"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750939AbdEJAAY (ORCPT ); Tue, 9 May 2017 20:00:24 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:36603 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750734AbdEJAAX (ORCPT ); Tue, 9 May 2017 20:00:23 -0400 Received: by mail-pg0-f67.google.com with SMTP id 64so1797331pgb.3 for ; Tue, 09 May 2017 17:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=rMrGeFAIitZ3+dbR7aQNptls1rfDPk5pJCwxoyt9+DY=; b=eQnn5eH7d2+9Z+8r2t0K0VAOMe84jf6EqnDyVrWcKRogN1DmhZlve5YAYmZsHcHSU7 BZNwp5hEXuhn+vcUYTbqL+km0rN4MVV9YCYD9emDJ7v3gLYfgNxjNnOpTFyr6/d+EF4w i60DF50+YwHJAcMeZDW6njK/tk0NmtquBFodaW1HPNHVmWXgqCHALEz4jNZrcc/VTYmn 9JZyXTnSCFGxa0rhQpVeb4zHHXepUy8x/9I2yZ/+NdO6Gv1kjNJSxWEDMPireuKIa7OA N79K0H9MVfDGrJl786qmTlErKEXWOjX5JQtqDB7XBH/lZx/DFc+nYlVxZwLfrpNaZAg9 PJmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=rMrGeFAIitZ3+dbR7aQNptls1rfDPk5pJCwxoyt9+DY=; b=uGdOah2NQq4E4iiR+ZPOvgU6Rueuj5S82IVyVPjycPjz95XikX2njdMjSRwgt3GAEF ZIx+9ctS0eL6hmJMtOSmt8nF+N8QtlaZKnKAFwvNFoRRxMs71zef7P2TOuScHSvyhdvp 7f/8vczJ4PbzsPuLvmN0Ahn7gNzb26LSdpTKpMxnA+rccd6aay0uAPGnHylF8L9usDCF lmoBJOldyULKJfpnz8C5c2XzPHj33NS2Eeo1j6zWQcbSTXo249WkbD8ws9PuD6Kr00iM hBLIL1EuOBr66rQlZa8mcH4sMTuyJdC72mFoJDwL1LU1ok2AwXosQ2GD5zhX71N6vCD/ zNww== X-Gm-Message-State: AODbwcDW1RP/0Jpub8YSr8QokkgC8WUz0sziIZ9xbuXgg6ReW3sOsTYz JVMssvxNFCrwTQ== X-Received: by 10.98.61.86 with SMTP id k83mr2947387pfa.62.1494374422904; Tue, 09 May 2017 17:00:22 -0700 (PDT) Received: from tw-172-25-30-113.office.twttr.net ([8.25.197.25]) by smtp.gmail.com with ESMTPSA id a16sm1999692pgd.22.2017.05.09.17.00.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 May 2017 17:00:21 -0700 (PDT) From: Cong Wang To: netdev@vger.kernel.org Cc: edumazet@google.com, Cong Wang Subject: [Patch net] ipv6/dccp: do not inherit ipv6_mc_list from parent Date: Tue, 9 May 2017 16:59:54 -0700 Message-Id: <1494374394-24373-1-git-send-email-xiyou.wangcong@gmail.com> X-Mailer: git-send-email 2.5.5 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Like commit 657831ffc38e ("dccp/tcp: do not inherit mc_list from parent") we should clear ipv6_mc_list etc. for IPv6 sockets too. Cc: Eric Dumazet Signed-off-by: Cong Wang Acked-by: Eric Dumazet --- net/dccp/ipv6.c | 6 ++++++ net/ipv6/tcp_ipv6.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index d9b6a4e..b6bbb71 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c @@ -426,6 +426,9 @@ static struct sock *dccp_v6_request_recv_sock(const struct sock *sk, newsk->sk_backlog_rcv = dccp_v4_do_rcv; newnp->pktoptions = NULL; newnp->opt = NULL; + newnp->ipv6_mc_list = NULL; + newnp->ipv6_ac_list = NULL; + newnp->ipv6_fl_list = NULL; newnp->mcast_oif = inet6_iif(skb); newnp->mcast_hops = ipv6_hdr(skb)->hop_limit; @@ -490,6 +493,9 @@ static struct sock *dccp_v6_request_recv_sock(const struct sock *sk, /* Clone RX bits */ newnp->rxopt.all = np->rxopt.all; + newnp->ipv6_mc_list = NULL; + newnp->ipv6_ac_list = NULL; + newnp->ipv6_fl_list = NULL; newnp->pktoptions = NULL; newnp->opt = NULL; newnp->mcast_oif = inet6_iif(skb); diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index aeb9497..df5a9ff 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -1062,6 +1062,7 @@ static struct sock *tcp_v6_syn_recv_sock(const struct sock *sk, struct sk_buff * newtp->af_specific = &tcp_sock_ipv6_mapped_specific; #endif + newnp->ipv6_mc_list = NULL; newnp->ipv6_ac_list = NULL; newnp->ipv6_fl_list = NULL; newnp->pktoptions = NULL; @@ -1131,6 +1132,7 @@ static struct sock *tcp_v6_syn_recv_sock(const struct sock *sk, struct sk_buff * First: no IPv4 options. */ newinet->inet_opt = NULL; + newnp->ipv6_mc_list = NULL; newnp->ipv6_ac_list = NULL; newnp->ipv6_fl_list = NULL;