diff options
author | Lorenz Bauer <lmb@cloudflare.com> | 2019-03-22 09:54:01 +0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-03-21 18:59:10 -0700 |
commit | edbf8c01de5a104a71ed6df2bf6421ceb2836a8e (patch) | |
tree | 5e603fa0b5f6f5a02f846d68c34050e1aafb4642 /kernel | |
parent | 85a51f8c28b9812642d76db6889f3f39dc3fbab3 (diff) | |
download | linux-edbf8c01de5a104a71ed6df2bf6421ceb2836a8e.tar.bz2 |
bpf: add skc_lookup_tcp helper
Allow looking up a sock_common. This gives eBPF programs
access to timewait and request sockets.
Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/bpf/verifier.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index a476e13201d6..dffeec3706ce 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -369,7 +369,8 @@ static bool is_release_function(enum bpf_func_id func_id) static bool is_acquire_function(enum bpf_func_id func_id) { return func_id == BPF_FUNC_sk_lookup_tcp || - func_id == BPF_FUNC_sk_lookup_udp; + func_id == BPF_FUNC_sk_lookup_udp || + func_id == BPF_FUNC_skc_lookup_tcp; } static bool is_ptr_cast_function(enum bpf_func_id func_id) |