virtio-net: Copy received header to buffer
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Fri, 22 Nov 2024 05:03:12 +0000 (14:03 +0900)
committerJason Wang <jasowang@redhat.com>
Mon, 25 Nov 2024 06:00:51 +0000 (14:00 +0800)
commit7987d2be5a8bc3a502f89ba8cf3ac3e09f64d1ce
treeef7edce0f61253a3962194b35c312eb516c10c1b
parent17437418c4ed0b779f7e9747fbffb08e139aa0ae
virtio-net: Copy received header to buffer

receive_header() used to cast the const qualifier of the pointer to the
received packet away to modify the header. Avoid this by copying the
received header to buffer.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/virtio-net.c