diff options
author | Mark McLoughlin <markmc@redhat.com> | 2009-10-28 14:07:23 +0000 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-30 09:42:35 -0500 |
commit | 3cbe04c44254dd22da89f426c21a60f5f0e2f8b4 (patch) | |
tree | 59dae7776763aa1a68a594147f4645c0a0f62756 /hw | |
parent | 76f5159d7fc4cdea9574dfbb54307735b280bc66 (diff) |
virtio-net: fix macaddr config regression
This commit:
commit 97b15621
virtio: use qdev properties for configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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 <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | 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 30e2fe9627..4bc111422a 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -834,6 +834,7 @@ VirtIODevice *virtio_net_init(DeviceState *dev, NICConf *conf) 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); qemu_macaddr_default_if_unset(&conf->macaddr); + 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, |