summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/test_sockmap.c
diff options
context:
space:
mode:
authorPengcheng Yang <yangpc@wangsu.com>2022-11-29 13:40:40 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2022-12-01 03:07:36 +0300
commit9072931f020bfd907d6d89ee21ff1481cd78b407 (patch)
tree5efdcf273715c4befe710602cef6106e98e7b283 /tools/testing/selftests/bpf/test_sockmap.c
parenta351d6087bf7d3d8440d58d3bf244ec64b89394a (diff)
downloadlinux-9072931f020bfd907d6d89ee21ff1481cd78b407.tar.xz
bpf, sockmap: Fix data loss caused by using apply_bytes on ingress redirect
Use apply_bytes on ingress redirect, when apply_bytes is less than the length of msg data, some data may be skipped and lost in bpf_tcp_ingress(). If there is still data in the scatterlist that has not been consumed, we cannot move the msg iter. Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: Pengcheng Yang <yangpc@wangsu.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Jakub Sitnicki <jakub@cloudflare.com> Link: https://lore.kernel.org/bpf/1669718441-2654-4-git-send-email-yangpc@wangsu.com
Diffstat (limited to 'tools/testing/selftests/bpf/test_sockmap.c')
0 files changed, 0 insertions, 0 deletions