virtio-net: disable guest csum during XDP set
We don't disable VIRTIO_NET_F_GUEST_CSUM if XDP was set. This means we
can receive partial csumed packets with metadata kept in the
vnet_hdr. This may have several side effects:
- It could be overridden by header adjustment, thus is might be not
correct after XDP processing.
- There's no way to pass such metadata information through
XDP_REDIRECT to another driver.
- XDP does not support checksum offload right now.
So simply disable guest csum if possible in this the case of XDP.
Fixes: 3f93522ffab2d ("virtio-net: switch off offloads on demand if possible on XDP set")
Reported-by: Jesper Dangaard Brouer <email@example.com>
Cc: Jesper Dangaard Brouer <firstname.lastname@example.org>
Cc: Pavel Popa <email@example.com>
Cc: David Ahern <firstname.lastname@example.org>
Signed-off-by: Jason Wang <email@example.com>
Signed-off-by: David S. Miller <firstname.lastname@example.org>
1 file changed