diff options
author | Stanislav Fomichev <sdf@google.com> | 2019-01-28 08:53:54 -0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-01-29 01:08:29 +0100 |
commit | b7a1848e8398b8396c990279e6a10272d818577e (patch) | |
tree | 1e7c535a6ab23d1e4e1f2d4a1a145a8fb6603da9 /net/core/filter.c | |
parent | c8aa703822bf811269975cf7251b5eaad4c38e9c (diff) | |
download | linux-b7a1848e8398b8396c990279e6a10272d818577e.tar.bz2 |
bpf: add BPF_PROG_TEST_RUN support for flow dissector
The input is packet data, the output is struct bpf_flow_key. This should
make it easy to test flow dissector programs without elaborate
setup.
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'net/core/filter.c')
-rw-r--r-- | net/core/filter.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index 8e587dd1da20..8ce421796ac6 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -7711,6 +7711,7 @@ const struct bpf_verifier_ops flow_dissector_verifier_ops = { }; const struct bpf_prog_ops flow_dissector_prog_ops = { + .test_run = bpf_prog_test_run_flow_dissector, }; int sk_detach_filter(struct sock *sk) |