Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1622541pxa; Thu, 20 Aug 2020 16:30:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLVJwALHNyhMZ2pu7HnE0ol3cPgZjVI1O0BuGJJOYJXvMb+i1sBPm1woxyh+oODJTqznAV X-Received: by 2002:aa7:c688:: with SMTP id n8mr137703edq.345.1597966225456; Thu, 20 Aug 2020 16:30:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597966225; cv=none; d=google.com; s=arc-20160816; b=iiCR6Y8AFsULf5srC7Jre1O5cWTCvKA3+RLBbnEHc4ejU6umf4+tZfouPIpyP3R0Mx +dv/5BhrVrj6/YijbUeax318TegEYOf2Z2mPkYnrIXFy2HM1OF6SKk3q2TVbnc384ORz +0/yOnZsFO+iqW48xWKoeDKFKbZ+AyKzr7Jkv+II1bQ5I4cRzZUt8BOXHT7kKRdd+fzD D2gdNAFsFRw5pMn5KFiWN81EogR0z9cTDc+ux9+yy9fkZOtTy8xSm6hdwAgZS1WnsHU+ /91hMnE6snqzIM4Z3TxZi6NwTRWg4YBVuZIGbwG45vv1Ny00WDAsc3kCCC29ff1xassk v2Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=fklFkgrSTeH54GOxRyh/JpyCNyfdbWVpWOXyKV+3Rao=; b=XaiBuqSjDA6EgD7ojqGsBmDN9TMU2SDKMxB1mgtwWZN1wbi8LCFrwMZ0rIuiRcbgPq ft4+jeQ/tAnO4RX38qEva0sg71UB1LlpjoFS0REdzMODyeDW+Zj8vPK9yRdhr6QK4pL+ 7sG3MYXQ2R+L2bREKBEbmgSTE5ziEC+2mQiWP4opRGXiLR4d+a0ugx1iEwlx/sRRPwTQ 0aDbnwvAwpgK0TnUMA+gthfGS1JzlLWy/II/3IzaCqp2mrLGIN+tme0GWU7FHKpYvr9F B9DPN/indeH3q4pMs7xrKeLwhTUtMj/Z2Mu4QMHpa869OaCY47x7oKv6p9+SajRA4siU Uv4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cc27si3106edb.503.2020.08.20.16.30.02; Thu, 20 Aug 2020 16:30:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728791AbgHTX3H (ORCPT + 99 others); Thu, 20 Aug 2020 19:29:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728498AbgHTX3H (ORCPT ); Thu, 20 Aug 2020 19:29:07 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1573C061385; Thu, 20 Aug 2020 16:29:06 -0700 (PDT) Received: from localhost (c-76-104-128-192.hsd1.wa.comcast.net [76.104.128.192]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 52C6D12879A36; Thu, 20 Aug 2020 16:12:20 -0700 (PDT) Date: Thu, 20 Aug 2020 16:29:05 -0700 (PDT) Message-Id: <20200820.162905.221555195371922950.davem@davemloft.net> To: mark.tomlinson@alliedtelesis.co.nz Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] gre6: Fix reception with IP6_TNL_F_RCV_DSCP_COPY From: David Miller In-Reply-To: <20200819015358.18559-1-mark.tomlinson@alliedtelesis.co.nz> References: <20200819015358.18559-1-mark.tomlinson@alliedtelesis.co.nz> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 20 Aug 2020 16:12:20 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mark Tomlinson Date: Wed, 19 Aug 2020 13:53:58 +1200 > When receiving an IPv4 packet inside an IPv6 GRE packet, and the > IP6_TNL_F_RCV_DSCP_COPY flag is set on the tunnel, the IPv4 header would > get corrupted. This is due to the common ip6_tnl_rcv() function assuming > that the inner header is always IPv6. This patch checks the tunnel > protocol for IPv4 inner packets, but still defaults to IPv6. > > Fixes: 308edfdf1563 ("gre6: Cleanup GREv6 receive path, call common GRE functions") > Signed-off-by: Mark Tomlinson Applied and queued up for -stable, thank you.