]> www.infradead.org Git - users/hch/dma-mapping.git/commit
bpf, sockmap: SK_DROP on attempted redirects of unsupported af_vsock
authorMichal Luczaj <mhal@rbox.co>
Sun, 13 Oct 2024 16:26:39 +0000 (18:26 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 17 Oct 2024 11:02:54 +0000 (13:02 +0200)
commit9c5bd93edf7b8834aecaa7c340b852d5990d7c78
treebe4c3e2466140f00e09796450377d10a6439f043
parent2aa587fd6659baef8722ccfb1d1d13d18e105059
bpf, sockmap: SK_DROP on attempted redirects of unsupported af_vsock

Don't mislead the callers of bpf_{sk,msg}_redirect_{map,hash}(): make sure
to immediately and visibly fail the forwarding of unsupported af_vsock
packets.

Fixes: 634f1a7110b4 ("vsock: support sockmap")
Signed-off-by: Michal Luczaj <mhal@rbox.co>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20241013-vsock-fixes-for-redir-v2-1-d6577bbfe742@rbox.co
include/net/sock.h
net/core/sock_map.c