From patchwork Tue Nov 21 14:03:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 119361 Delivered-To: patch@linaro.org Received: by 10.80.225.132 with SMTP id k4csp5132972edl; Tue, 21 Nov 2017 06:03:18 -0800 (PST) X-Google-Smtp-Source: AGs4zMaoCbsr8cAYcqwS/bZTcYijY5bFpgkB0T7PdGnwLJCanF/CRbLEJkXPAynsVJBvM0HEgvPh X-Received: by 10.84.229.5 with SMTP id b5mr18004735plk.405.1511272998379; Tue, 21 Nov 2017 06:03:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511272998; cv=none; d=google.com; s=arc-20160816; b=uk/LmwydP4VlZoC7NvbxvAynAWPQQSnk8ePU7FeirXaVVJ+1BV9n62bzldiCiv1jKR asKWALQG7Zw6yklbdyTDkXPfpg4mjGFzT6Bsst3EBm2h3toBN2n8GynKKdiAsbDY0KhT HoskQlfCa9Iu6Wy5Zx+rEUNpMM7pprtK71YwZUdWEpkgbQ2KpI04ycw6kd0mtYxlDiLb /UsXzq1VBZKjQaFx9kdCfsgloIcjjFdUgP9N77uEOIn0zCwtjjzOyWSqSql2dHaa5E28 i9LUjN+4jrEIlW4u9r0akIc/Yb0nXwKLwzUwFRAoc+kX3iT9dEtFxv34j8TB2bBCXDdh vg9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=8838Ik52WMQ2XpjApYxn4fm5uzCrVjhNHUSd+ItqlYQ=; b=kTF+DnCh+leLSt2AduS6pOHqZK2B4Jxi8yeysyNsEUpswrizXHOaX7Irt3xN94U/oS 9lf6AUdsrMWbuTVKlWFxrIvakwwcKXEWvBe7GMksZRaQki4tc6Hw29wEClF5Gg17DFgh 3oGvcsNol8bXgZyg61n6e8yW8wSbOK525TapgN1f8WZUIl7PJJp/2x0Y4+qhsLNybP/F l35RxbivRtYaoBEBp8QqmzsoDeercUJ6oNs5SAbZ5Zo3H2KZqjAm2nvQxvs2vymce2zl wVMSAzXkepKjXnXJVBppiwHRjKIOrxKv2oqAQS60TsBvPVttasWFb+t+6gmTywOy7ruz /fIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QSRv3lVk; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u26si10821002pgo.182.2017.11.21.06.03.18; Tue, 21 Nov 2017 06:03:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QSRv3lVk; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751262AbdKUODR (ORCPT + 9 others); Tue, 21 Nov 2017 09:03:17 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:42111 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751191AbdKUODQ (ORCPT ); Tue, 21 Nov 2017 09:03:16 -0500 Received: by mail-pf0-f195.google.com with SMTP id m88so9895629pfi.9 for ; Tue, 21 Nov 2017 06:03:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=8838Ik52WMQ2XpjApYxn4fm5uzCrVjhNHUSd+ItqlYQ=; b=QSRv3lVkByJehq+kJGFv6Ek6aynrSLDaH/AWSvaUBdu2ONcrt8P4Q2l0FzDjyLDxvf cwv5OfTLYmoTp9/LuuKyMcXWUL3fBFp2Xi8NCe6VdPiiry0NTs/WJha7sbhxpXFVhtsh 94g9r4766zANvfLSBYsIbytuYI2eliNE+oNxs= 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=8838Ik52WMQ2XpjApYxn4fm5uzCrVjhNHUSd+ItqlYQ=; b=g+9GTaauFoIs8FTrcsH5Et2JEujmQ288AfpfIBj66uVtwdvqq6hIl7g81Y4O8C6AFr TICUM6tPOoxJGHmYREUkPY3Ao+HtQpDz21Ey9Gla4oO9ZXjGeQzVWyZcAIVZ05BhLPx6 41OLELViqFwHlD+i4jSJEWA3beTFQ1T+49zBFkr9aRoVTsVY92Ew1aDy5/pPNqQGIMQb dRBBd87oZLdMPT26CWo7TTfjkIzOH35jhlFKhTRvPucKF48Ontc7P++DCIObWt6A1RbF ne3SQqRJNoJ1PswyOUcTXQedpWlMOBaWdMx+oTLRDt8/7RP9mxuFS3t1J2Ta2zfzabvz jGxQ== X-Gm-Message-State: AJaThX4Kg3CzP5DJDNAt2LC7bMTtYA5hBfst7z8lH7UPCXf6oAM+UNF5 2RRQYWRBuS7z9Dy24iTJhLJwRg== X-Received: by 10.99.138.194 with SMTP id y185mr16913320pgd.290.1511272996105; Tue, 21 Nov 2017 06:03:16 -0800 (PST) Received: from localhost.localdomain ([106.51.20.135]) by smtp.gmail.com with ESMTPSA id k23sm25286993pfj.22.2017.11.21.06.03.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Nov 2017 06:03:15 -0800 (PST) From: Amit Pundir To: Greg KH Cc: Stable , WANG Cong , Eric Dumazet , "David S . Miller" , Connor O'Brien Subject: [PATCH for-3.18.y] ipv6/dccp: do not inherit ipv6_mc_list from parent Date: Tue, 21 Nov 2017 19:33:10 +0530 Message-Id: <1511272990-14241-1-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: WANG Cong commit 83eaddab4378db256d00d295bda6ca997cd13a52 upstream. 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 Signed-off-by: David S. Miller Signed-off-by: Connor O'Brien [AmitP: cherry-picked this backported commit from android-3.18] Signed-off-by: Amit Pundir --- net/dccp/ipv6.c | 7 +++++++ net/ipv6/tcp_ipv6.c | 2 ++ 2 files changed, 9 insertions(+) -- 2.7.4 diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index ff186dac3e07..4d925dbe4bb7 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c @@ -487,6 +487,9 @@ static struct sock *dccp_v6_request_recv_sock(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; @@ -562,6 +565,10 @@ static struct sock *dccp_v6_request_recv_sock(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; + /* Clone pktoptions received with SYN */ newnp->pktoptions = NULL; if (ireq->pktopts != NULL) { diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 19fe7b789a72..b8e05f16659c 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -1113,6 +1113,7 @@ static struct sock *tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, 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; @@ -1184,6 +1185,7 @@ static struct sock *tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, First: no IPv4 options. */ newinet->inet_opt = NULL; + newnp->ipv6_mc_list = NULL; newnp->ipv6_ac_list = NULL; newnp->ipv6_fl_list = NULL;