Skip to content
Commit 436c9453 authored by Jason Wang's avatar Jason Wang Committed by David S. Miller
Browse files

virtio-net: keep vnet header zeroed after processing XDP

We copy vnet header unconditionally in page_to_skb() this is wrong
since XDP may modify the packet data. So let's keep a zeroed vnet
header for not confusing the conversion between vnet header and skb
metadata.

In the future, we should able to detect whether or not the packet was
modified and keep using the vnet header when packet was not touched.

Fixes: f600b690

 ("virtio_net: Add XDP support")
Reported-by: default avatarPavel Popa <pashinho1990@gmail.com>
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9b2156fa
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