From: Davide Caratti Date: Tue, 17 Sep 2019 09:30:55 +0000 (+0200) Subject: net/sched: act_sample: don't push mac header on ip6gre ingress X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5c0146b51fa2118ddcd68d2da2d21174face307b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git net/sched: act_sample: don't push mac header on ip6gre ingress [ 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 --- diff --git a/net/sched/act_sample.c b/net/sched/act_sample.c index 489db1064d5b..9d92eac01958 100644 --- a/net/sched/act_sample.c +++ b/net/sched/act_sample.c @@ -132,6 +132,7 @@ static bool tcf_sample_dev_ok_push(struct net_device *dev) case ARPHRD_TUNNEL6: case ARPHRD_SIT: case ARPHRD_IPGRE: + case ARPHRD_IP6GRE: case ARPHRD_VOID: case ARPHRD_NONE: return false;