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.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 DE40BC10F14 for ; Thu, 3 Oct 2019 17:05:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B622520865 for ; Thu, 3 Oct 2019 17:05:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570122337; bh=yJTABhNQ8E3OsyhkcoBAnjIx9rthdXM5DCfNC8roBKs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ULs9FJH/ncLHWkrTR3mYWExLQqKqD8Asd3cAUjOuG0Kvl6rfL9CHIlh0XLSiUkj5N WXGyUn95BI8Z593xKylzezyPTKpFOwSJiIkTvP3Fc/kVBjeUQbDRq39gtXAuZFwJBW bpetAUpkEDbbg75VrJ3AzZrsKRY8fF/Pn1WNUtas= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404777AbfJCQj2 (ORCPT ); Thu, 3 Oct 2019 12:39:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:49370 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404735AbfJCQj1 (ORCPT ); Thu, 3 Oct 2019 12:39:27 -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 721932070B; Thu, 3 Oct 2019 16:39:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570120766; bh=yJTABhNQ8E3OsyhkcoBAnjIx9rthdXM5DCfNC8roBKs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e9J8iA8zHpwfog3YK89ItDymvAk+8LF1Wnow0m8qmMrLWVx0vIVceaWcAeTWAbt17 FkPWsJLQi4dCO/zU60vjbwXy8FQc99CCirc/tx/kfb8YNO+b6hnFyadW6NdewU6Mia CxKhxFVqIQkHQ4hVSXWdaTjLcPT62aNH7Xd7m0lo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Davide Caratti , Yotam Gigi , Jakub Kicinski Subject: [PATCH 5.3 007/344] net/sched: act_sample: dont push mac header on ip6gre ingress Date: Thu, 3 Oct 2019 17:49:32 +0200 Message-Id: <20191003154540.793882755@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154540.062170222@linuxfoundation.org> References: <20191003154540.062170222@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Davide Caratti [ Upstream commit 92974a1d006ad8b30d53047c70974c9e065eb7df ] current 'sample' action doesn't push the mac header of ingress packets if they are received by a layer 3 tunnel (like gre or sit); but it forgot to check for gre over ipv6, so the following script: # tc q a dev $d clsact # tc f a dev $d ingress protocol ip flower ip_proto icmp action sample \ > group 100 rate 1 # psample -v -g 100 dumps everything, including outer header and mac, when $d is a gre tunnel over ipv6. Fix this adding a missing label for ARPHRD_IP6GRE devices. Fixes: 5c5670fae430 ("net/sched: Introduce sample tc action") Signed-off-by: Davide Caratti Reviewed-by: Yotam Gigi Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/sched/act_sample.c | 1 + 1 file changed, 1 insertion(+) --- a/net/sched/act_sample.c +++ b/net/sched/act_sample.c @@ -146,6 +146,7 @@ static bool tcf_sample_dev_ok_push(struc case ARPHRD_TUNNEL6: case ARPHRD_SIT: case ARPHRD_IPGRE: + case ARPHRD_IP6GRE: case ARPHRD_VOID: case ARPHRD_NONE: return false;