diff options
author | Michal Luczaj <mhal@rbox.co> | 2024-07-13 21:41:41 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2024-07-17 22:51:55 +0200 |
commit | 6caf9efaa169faea10a369dd6b36806ae6842584 (patch) | |
tree | 6f122634b50b53b7585557f080bd02946cb006b3 /kernel | |
parent | 0befb349c4cdcc4e3c2f4aff81259a3a58c3b33e (diff) | |
download | linux-stable-6caf9efaa169faea10a369dd6b36806ae6842584.tar.gz linux-stable-6caf9efaa169faea10a369dd6b36806ae6842584.tar.bz2 linux-stable-6caf9efaa169faea10a369dd6b36806ae6842584.zip |
selftests/bpf: Test sockmap redirect for AF_UNIX MSG_OOB
Verify that out-of-band packets are silently dropped before they reach the
redirection logic.
The idea is to test with a 2 byte long send(). Should a MSG_OOB flag be in
use, only the last byte will be treated as out-of-band. Test fails if
verd_mapfd indicates a wrong number of packets processed (e.g. if OOB
wasn't dropped at the source) or if it was possible to recv() MSG_OOB from
the mapped socket, or if any stale OOB data have been left reachable from
the unmapped socket.
Signed-off-by: Michal Luczaj <mhal@rbox.co>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Tested-by: Jakub Sitnicki <jakub@cloudflare.com>
Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
Link: https://lore.kernel.org/bpf/20240713200218.2140950-5-mhal@rbox.co
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions