mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
virtio-net: fix offload ctrl endian
Spec said offloads should be le64, so use virtio_ldq_p() to guarantee
valid endian.
Fixes: 644c98587d
("virtio-net: dynamic network offloads configuration")
Cc: qemu-stable@nongnu.org
Cc: Dmitry Fleytman <dfleytma@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
5f997fd17b
commit
189ae6bb5c
1 changed files with 2 additions and 0 deletions
|
@ -758,6 +758,8 @@ static int virtio_net_handle_offloads(VirtIONet *n, uint8_t cmd,
|
|||
if (cmd == VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET) {
|
||||
uint64_t supported_offloads;
|
||||
|
||||
offloads = virtio_ldq_p(vdev, &offloads);
|
||||
|
||||
if (!n->has_vnet_hdr) {
|
||||
return VIRTIO_NET_ERR;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue