diff options
author | John Fastabend <john.fastabend@gmail.com> | 2018-09-18 09:01:44 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-09-22 02:46:41 +0200 |
commit | 5607fff303636d48b88414c6be353d9fed700af2 (patch) | |
tree | be7338b7007ecd330061ccbe9b00e339575c6f60 /tools/testing/radix-tree/xarray.c | |
parent | 080220b687147fd9376878534aba7194f17f6ef5 (diff) |
bpf: sockmap only allow ESTABLISHED sock state
After this patch we only allow socks that are in ESTABLISHED state or
are being added via a sock_ops event that is transitioning into an
ESTABLISHED state. By allowing sock_ops events we allow users to
manage sockmaps directly from sock ops programs. The two supported
sock_ops ops are BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB and
BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB.
Similar to TLS ULP this ensures sk_user_data is correct.
Reported-by: Eric Dumazet <edumazet@google.com>
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/testing/radix-tree/xarray.c')
0 files changed, 0 insertions, 0 deletions