diff --git a/hw/virtio-net.c b/hw/virtio-net.c index 1d61f191b60c14ea2bec6fb4eb31621284c0461a..43a2b3daf0dd6e81c1b800e5661aa8bc00882a2b 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -424,6 +424,9 @@ static void virtio_net_handle_rx(VirtIODevice *vdev, VirtQueue *vq) static int virtio_net_can_receive(VLANClientState *nc) { VirtIONet *n = DO_UPCAST(NICState, nc, nc)->opaque; + if (!n->vm_running) { + return 0; + } if (!virtio_queue_ready(n->rx_vq) || !(n->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK))