bpf: sockmap, test for unconnected af_unix sock
authorJohn Fastabend <john.fastabend@gmail.com>
Fri, 1 Dec 2023 18:01:39 +0000 (10:01 -0800)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 14 Dec 2023 00:33:01 +0000 (16:33 -0800)
commit50d96f05af6787a34b4eca2ee3fc1993289c4c24
treefa6dcb7f84468e7631a8be8d1f4eb3b318d9d66f
parent8d6650646ce49e9a5b8c5c23eb94f74b1749f70f
bpf: sockmap, test for unconnected af_unix sock

Add test to sockmap_basic to ensure af_unix sockets that are not connected
can not be added to the map. Ensure we keep DGRAM sockets working however
as these will not be connected typically.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Jakub Sitnicki <jakub@cloudflare.com>
Link: https://lore.kernel.org/r/20231201180139.328529-3-john.fastabend@gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/prog_tests/sockmap_basic.c