[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] virtio-net: fix macaddr config regression

From: Mark McLoughlin
Subject: [Qemu-devel] [PATCH] virtio-net: fix macaddr config regression
Date: Wed, 28 Oct 2009 14:07:23 +0000

This commit:

    commit 97b15621
    virtio: use qdev properties for configuration.

    Signed-off-by: Gerd Hoffmann <address@hidden>
    Signed-off-by: Anthony Liguori <address@hidden>

makes a guest using virtio-net see an empty macaddr because we never
copy the macaddr into the location that virtio_net_get_config() uses.

Signed-off-by: Mark McLoughlin <address@hidden>
 hw/virtio-net.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index 93294af..4b09a93 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -837,6 +837,7 @@ VirtIODevice *virtio_net_init(DeviceState *dev, NICConf 
     n->tx_vq = virtio_add_queue(&n->vdev, 256, virtio_net_handle_tx);
     n->ctrl_vq = virtio_add_queue(&n->vdev, 64, virtio_net_handle_ctrl);
+    memcpy(&n->mac[0], &conf->macaddr, sizeof(n->mac));
     n->status = VIRTIO_NET_S_LINK_UP;
     n->vc = qemu_new_vlan_client(NET_CLIENT_TYPE_NIC, conf->vlan, conf->peer,
                                  dev->info->name, dev->id,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]