From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N39DO-0004gX-LP for qemu-devel@nongnu.org; Wed, 28 Oct 2009 10:09:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N39DI-0004dL-Tw for qemu-devel@nongnu.org; Wed, 28 Oct 2009 10:09:30 -0400 Received: from [199.232.76.173] (port=42735 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N39DI-0004dC-IC for qemu-devel@nongnu.org; Wed, 28 Oct 2009 10:09:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9806) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N39DH-000611-2N for qemu-devel@nongnu.org; Wed, 28 Oct 2009 10:09:24 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9SE9Kpg023623 for ; Wed, 28 Oct 2009 10:09:21 -0400 From: Mark McLoughlin In-Reply-To: <1256131543-28416-15-git-send-email-kraxel@redhat.com> References: <1256131543-28416-1-git-send-email-kraxel@redhat.com> <1256131543-28416-15-git-send-email-kraxel@redhat.com> Content-Type: text/plain Date: Wed, 28 Oct 2009 14:07:23 +0000 Message-Id: <1256738843.5105.37.camel@blaa> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] virtio-net: fix macaddr config regression Reply-To: Mark McLoughlin List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org This commit: commit 97b15621 virtio: use qdev properties for configuration. Signed-off-by: Gerd Hoffmann Signed-off-by: Anthony Liguori 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 --- 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 *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, -- 1.6.2.5