diff options
author | John Fastabend <john.fastabend@gmail.com> | 2023-05-22 19:56:17 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2023-05-23 16:11:20 +0200 |
commit | 80e24d22267597b2ace54686735e3c4cb26a523f (patch) | |
tree | b0279fe9a9aa9979980d77a07b26c69b70d56889 /net/unix/af_unix.c | |
parent | bb516f98c731cafe27900f43c0ef0aa7b5a9a44b (diff) |
bpf, sockmap: Test FIONREAD returns correct bytes in rx buffer with drops
When BPF program drops pkts the sockmap logic 'eats' the packet and
updates copied_seq. In the PASS case where the sk_buff is accepted
we update copied_seq from recvmsg path so we need a new test to
handle the drop case.
Original patch series broke this resulting in
test_sockmap_skb_verdict_fionread:PASS:ioctl(FIONREAD) error 0 nsec
test_sockmap_skb_verdict_fionread:FAIL:ioctl(FIONREAD) unexpected ioctl(FIONREAD): actual 1503041772 != expected 256
After updated patch with fix.
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
Link: https://lore.kernel.org/bpf/20230523025618.113937-14-john.fastabend@gmail.com
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions