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 E25C0C10F14 for ; Thu, 3 Oct 2019 17:31:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B83AE20830 for ; Thu, 3 Oct 2019 17:31:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570123901; bh=aLeUPhQywBnP/8Vt6D0GiKb7MLtaQeJ77BRgxl09D48=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=g5sB6wn1BFecQMESfqLrYUlYBqKEWFpe1uPMKqBUytJKtS2+ZppCOSu/skcVc0fSB SYptH+KvLQrX2zRZZ8O7pltXg4VxiDSOAA7BuvQAr7/UC2uj5224m4oqbt9xdIRTWt lZushQxXVD1aVro/1ZowKfh3ym3lodw7zBJA3B1w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732151AbfJCRbh (ORCPT ); Thu, 3 Oct 2019 13:31:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:59068 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387538AbfJCQKA (ORCPT ); Thu, 3 Oct 2019 12:10:00 -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 1C0AE215EA; Thu, 3 Oct 2019 16:09:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570118999; bh=aLeUPhQywBnP/8Vt6D0GiKb7MLtaQeJ77BRgxl09D48=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dHDoOaeOUZQhRDjxi3lGlIHr2eYzGrEbmXBmaSvDuKaLMT0yZbjrz3HAKz1gubVqB VuiL1Wnj1pRppoEYsGv0jKU9NjyPlu64U0f5v2xVTT0PvkgQP74+KSgShFLv4XqTlB TChA2CydMfxHMDVwdOocqpsvjQBLQlVdNx30lkpA= 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 4.14 039/185] net/sched: act_sample: dont push mac header on ip6gre ingress Date: Thu, 3 Oct 2019 17:51:57 +0200 Message-Id: <20191003154446.354472289@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154437.541662648@linuxfoundation.org> References: <20191003154437.541662648@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 @@ -132,6 +132,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;