aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/filter.c
diff options
context:
space:
mode:
authorStanislav Fomichev <sdf@google.com>2019-01-28 08:53:54 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2019-01-29 01:08:29 +0100
commitb7a1848e8398b8396c990279e6a10272d818577e (patch)
tree1e7c535a6ab23d1e4e1f2d4a1a145a8fb6603da9 /net/core/filter.c
parentnet/flow_dissector: move bpf case into __skb_flow_bpf_dissect (diff)
downloadlinux-dev-b7a1848e8398b8396c990279e6a10272d818577e.tar.xz
linux-dev-b7a1848e8398b8396c990279e6a10272d818577e.zip
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.c1
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)