]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Sat, 21 Sep 2019 00:01:59 +0000 (17:01 -0700)
commit321043b88e4cc038ba9733635157c413da5d9f0f
treeca18278b0a6b4fd9731ce7dd05eba58a689f5608
parentd45ea9f364be4759d7452577e88cb82fbf53f34c
net/sched: act_sample: don't push mac header on ip6gre ingress

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: 00966d13ecc3 ("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>
net/sched/act_sample.c