diff options
author | Stanislav Fomichev <sdf@google.com> | 2019-04-22 08:55:52 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-04-23 18:36:35 +0200 |
commit | 02ee0658362d3713421851bb7487af77a4098bb5 (patch) | |
tree | da9f76ad09a765c5818de87d3b4e5401725ed49d /net/bpf/test_run.c | |
parent | fe993c646831105f579976fec28d1842608bd551 (diff) | |
download | linux-stable-02ee0658362d3713421851bb7487af77a4098bb5.tar.gz linux-stable-02ee0658362d3713421851bb7487af77a4098bb5.tar.bz2 linux-stable-02ee0658362d3713421851bb7487af77a4098bb5.zip |
bpf/flow_dissector: don't adjust nhoff by ETH_HLEN in BPF_PROG_TEST_RUN
Now that we use skb-less flow dissector let's return true nhoff and
thoff. We used to adjust them by ETH_HLEN because that's how it was
done in the skb case. For VLAN tests that looks confusing: nhoff is
pointing to vlan parts :-\
Warning, this is an API change for BPF_PROG_TEST_RUN! Feel free to drop
if you think that it's too late at this point to fix it.
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'net/bpf/test_run.c')
-rw-r--r-- | net/bpf/test_run.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c index db2ec88ab129..8606e5aef0b6 100644 --- a/net/bpf/test_run.c +++ b/net/bpf/test_run.c @@ -418,9 +418,6 @@ int bpf_prog_test_run_flow_dissector(struct bpf_prog *prog, retval = bpf_flow_dissect(prog, &ctx, eth->h_proto, ETH_HLEN, size); - flow_keys.nhoff -= ETH_HLEN; - flow_keys.thoff -= ETH_HLEN; - if (signal_pending(current)) { preempt_enable(); rcu_read_unlock(); |