]> git.ipfire.org Git - thirdparty/linux.git/commit
selftest/bpf: Add vsock test for sockmap rejecting unconnected
authorMichal Luczaj <mhal@rbox.co>
Thu, 13 Feb 2025 11:58:52 +0000 (12:58 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 18 Feb 2025 11:00:01 +0000 (12:00 +0100)
commit85928e9c436398abcac32a9afa2f591895dd497d
treef9df1432187a4be7273716c30e8e939a674dbca2
parent8350695bfb169b1924626a68f76b369ad01f18f2
selftest/bpf: Add vsock test for sockmap rejecting unconnected

Verify that for a connectible AF_VSOCK socket, merely having a transport
assigned is insufficient; socket must be connected for the sockmap to
accept.

This does not test datagram vsocks. Even though it hardly matters. VMCI is
the only transport that features VSOCK_TRANSPORT_F_DGRAM, but it has an
unimplemented vsock_transport::readskb() callback, making it unsupported by
BPF/sockmap.

Signed-off-by: Michal Luczaj <mhal@rbox.co>
Acked-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/bpf/prog_tests/sockmap_basic.c