bpf: test_maps, only support ESTABLISHED socks
authorJohn Fastabend <john.fastabend@gmail.com>
Tue, 18 Sep 2018 16:01:54 +0000 (09:01 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Sat, 22 Sep 2018 00:46:42 +0000 (02:46 +0200)
commit5028027844cfc6168e39650abecd817ba64c9d98
tree190592cc86e20253f0c3220c2bcaeb24e2dd4d5e
parentb05545e15e1ff1d6a6a8593971275f9cc3e6b92b
bpf: test_maps, only support ESTABLISHED socks

Ensure that sockets added to a sock{map|hash} that is not in the
ESTABLISHED state is rejected.

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>
tools/testing/selftests/bpf/test_maps.c