net/sched: act_sample: don't push mac header on ip6gre ingress
authorDavide Caratti <dcaratti@redhat.com>
Tue, 17 Sep 2019 09:30:55 +0000 (11:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2019 10:47:40 +0000 (12:47 +0200)
commit5c0146b51fa2118ddcd68d2da2d21174face307b
tree6ecefc8aea88581ccf7bbf0f0b5393db6a6006a4
parent088f93d00b81fe888fdd5f4a3e5b0383cbdf4d95
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 <dcaratti@redhat.com>
Reviewed-by: Yotam Gigi <yotam.gi@gmail.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sched/act_sample.c