diff options
author | Alex Williamson <alex.williamson@hp.com> | 2009-05-17 10:43:19 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-05-21 12:05:19 +0300 |
commit | 005d573c7f7e4d1696b4650240fc5ce2ac665fd3 (patch) | |
tree | 30ed6a75921da236c49e6a6c3689c5dcbc8d1fc7 | |
parent | f59ce0d4d0be98190d45e6389f32c39f0571ead9 (diff) |
virtio-net: Refuse loading if the source requires vnet header and the host doesn't support itqemu-kvm-0.10.5rc1qemu-kvm-0.10.5
Bail if the saved image requires vnet header support.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | hw/virtio-net.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/virtio-net.c b/hw/virtio-net.c index 2da4c478e..f65ecd7d1 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -658,14 +658,15 @@ static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) if (version_id >= 6) qemu_get_buffer(f, (uint8_t *)n->vlans, MAX_VLAN >> 3); -#ifdef TAP_VNET_HDR if (version_id == 7 && qemu_get_be32(f)) { +#ifdef TAP_VNET_HDR tap_using_vnet_hdr(n->vc->vlan->first_client, 1); - } #else - /* FIXME: error out if nonzero? */ - qemu_get_be32(f); + fprintf(stderr, + "virtio-net: saved image requires vnet header support\n"); + exit(1); #endif + } if (n->tx_timer_active) { qemu_mod_timer(n->tx_timer, |