diff options
author | Petar Penkov <ppenkov@google.com> | 2019-07-29 09:59:17 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-07-30 21:03:05 -0700 |
commit | 637f71c09ba22d1042f5b48b58c249ee5665d44d (patch) | |
tree | 9a1b3fb75a2f582eee1fd85f8f2b37b47236a36c | |
parent | 3745ee18017e36be34f6f2a81e802a20e54e5e8b (diff) |
selftests/bpf: bpf_tcp_gen_syncookie->bpf_helpers
Expose bpf_tcp_gen_syncookie to selftests.
Signed-off-by: Petar Penkov <ppenkov@google.com>
Reviewed-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
-rw-r--r-- | tools/testing/selftests/bpf/bpf_helpers.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/bpf_helpers.h b/tools/testing/selftests/bpf/bpf_helpers.h index f804f210244e..120aa86c58d3 100644 --- a/tools/testing/selftests/bpf/bpf_helpers.h +++ b/tools/testing/selftests/bpf/bpf_helpers.h @@ -228,6 +228,9 @@ static void *(*bpf_sk_storage_get)(void *map, struct bpf_sock *sk, static int (*bpf_sk_storage_delete)(void *map, struct bpf_sock *sk) = (void *)BPF_FUNC_sk_storage_delete; static int (*bpf_send_signal)(unsigned sig) = (void *)BPF_FUNC_send_signal; +static long long (*bpf_tcp_gen_syncookie)(struct bpf_sock *sk, void *ip, + int ip_len, void *tcp, int tcp_len) = + (void *) BPF_FUNC_tcp_gen_syncookie; /* llvm builtin functions that eBPF C program may use to * emit BPF_LD_ABS and BPF_LD_IND instructions |