* [PATCH net] net/sched: act_sample: don't push mac header on ip6gre ingress
@ 2019-09-17 9:30 Davide Caratti
2019-09-17 11:45 ` yotam gigi
2019-09-21 1:12 ` Jakub Kicinski
0 siblings, 2 replies; 3+ messages in thread
From: Davide Caratti @ 2019-09-17 9:30 UTC (permalink / raw)
To: Jiri Pirko, Cong Wang, Jamal Hadi Salim, David S. Miller, netdev
Cc: Yotam Gigi
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>
---
net/sched/act_sample.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/sched/act_sample.c b/net/sched/act_sample.c
index 10229124a992..86344fd2ff1f 100644
--- a/net/sched/act_sample.c
+++ b/net/sched/act_sample.c
@@ -146,6 +146,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;
--
2.21.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net/sched: act_sample: don't push mac header on ip6gre ingress
2019-09-17 9:30 [PATCH net] net/sched: act_sample: don't push mac header on ip6gre ingress Davide Caratti
@ 2019-09-17 11:45 ` yotam gigi
2019-09-21 1:12 ` Jakub Kicinski
1 sibling, 0 replies; 3+ messages in thread
From: yotam gigi @ 2019-09-17 11:45 UTC (permalink / raw)
To: Davide Caratti
Cc: Jiri Pirko, Cong Wang, Jamal Hadi Salim, David S. Miller, netdev,
Yotam Gigi
On Tue, Sep 17, 2019 at 1:02 PM Davide Caratti <dcaratti@redhat.com> wrote:
>
> 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")
Reviewed-by: Yotam Gigi <yotam.gi@gmail.com>
> Signed-off-by: Davide Caratti <dcaratti@redhat.com>
> ---
> net/sched/act_sample.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/sched/act_sample.c b/net/sched/act_sample.c
> index 10229124a992..86344fd2ff1f 100644
> --- a/net/sched/act_sample.c
> +++ b/net/sched/act_sample.c
> @@ -146,6 +146,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;
> --
> 2.21.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net/sched: act_sample: don't push mac header on ip6gre ingress
2019-09-17 9:30 [PATCH net] net/sched: act_sample: don't push mac header on ip6gre ingress Davide Caratti
2019-09-17 11:45 ` yotam gigi
@ 2019-09-21 1:12 ` Jakub Kicinski
1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2019-09-21 1:12 UTC (permalink / raw)
To: Davide Caratti
Cc: Jiri Pirko, Cong Wang, Jamal Hadi Salim, David S. Miller, netdev,
Yotam Gigi
On Tue, 17 Sep 2019 11:30:55 +0200, Davide Caratti wrote:
> 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>
Applied, queued for stable, thank you!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-21 1:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-17 9:30 [PATCH net] net/sched: act_sample: don't push mac header on ip6gre ingress Davide Caratti
2019-09-17 11:45 ` yotam gigi
2019-09-21 1:12 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).