From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3F77C43381 for ; Mon, 1 Apr 2019 17:13:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A1BE221934 for ; Mon, 1 Apr 2019 17:13:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554138824; bh=3WDZpvBryUxFJC29Qlk2FELZ8U5MiYJRCQnyP3YjoyY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=WDYAO5fm0rTXET2HYv8OqhxZMuE5k20akpI7BLET/J9NNwrXsttfJRQUH/hxp4zM2 bZRgxp5WmxVreMUwe6/1lpoR8avTeCVYQ8PZ6ezZtQ5XZ7F2kdeB7N73n+ZRVjpEdO Xm7hbB574+GLE3HP9KAQOxMBqxMqr56Z8n11Y6cw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728736AbfDARNn (ORCPT ); Mon, 1 Apr 2019 13:13:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:36416 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730601AbfDARNk (ORCPT ); Mon, 1 Apr 2019 13:13:40 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 685C321934; Mon, 1 Apr 2019 17:13:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554138819; bh=3WDZpvBryUxFJC29Qlk2FELZ8U5MiYJRCQnyP3YjoyY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pqlMPKPpWmfr4IwH6rfvbVNrkUXqhyDffPIVw1eu4sRRK4mvdtEXsKPi/d4V1tZ+w eSZvSLTVPo9tK2mpQH5sliedUSjIVTEfZ8GVcdI9T9T07NMnZoSzvQniaMU/XlksRL GdkGK1PZxUVmMb6oUyrTLbCvlBWkrAW3GAIYGD1k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , "David S. Miller" Subject: [PATCH 4.19 004/134] dccp: do not use ipv6 header for ipv4 flow Date: Mon, 1 Apr 2019 19:00:40 +0200 Message-Id: <20190401170044.628952403@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190401170044.243719205@linuxfoundation.org> References: <20190401170044.243719205@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eric Dumazet [ Upstream commit e0aa67709f89d08c8d8e5bdd9e0b649df61d0090 ] When a dual stack dccp listener accepts an ipv4 flow, it should not attempt to use an ipv6 header or inet6_iif() helper. Fixes: 3df80d9320bc ("[DCCP]: Introduce DCCPv6") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/dccp/ipv6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c @@ -433,8 +433,8 @@ static struct sock *dccp_v6_request_recv 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; + newnp->mcast_oif = inet_iif(skb); + newnp->mcast_hops = ip_hdr(skb)->ttl; /* * No need to charge this sock to the relevant IPv6 refcnt debug socks count