Michal Luczaj 6caf9efaa1 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
2024-07-17 22:51:55 +02:00
..
2024-07-16 12:09:03 -07:00
2024-07-17 22:45:58 +02:00
2024-04-25 20:56:15 -07:00
2024-07-16 16:55:33 -07:00
2024-06-06 11:44:42 -07:00