Skip to content
Commit aaa64527 authored by Nikita V. Shirokov's avatar Nikita V. Shirokov Committed by Daniel Borkmann
Browse files

bpf: fix virtio-net's length calc for XDP_PASS

In commit 6870de43 ("bpf: make virtio compatible w/
bpf_xdp_adjust_tail") i didn't account for vi->hdr_len during new
packet's length calculation after bpf_prog_run in receive_mergeable.
because of this all packets, if they were passed to the kernel,
were truncated by 12 bytes.

Fixes:6870de43

 ("bpf: make virtio compatible w/ bpf_xdp_adjust_tail")
Reported-by: default avatarDavid Ahern <dsahern@gmail.com>

Signed-off-by: default avatarNikita V. Shirokov <tehnerd@tehnerd.com>
Acked-by: default avatarJason Wang <jasowang@redhat.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent 48d7a07b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment