]> git.proxmox.com Git - qemu.git/commitdiff
virtio-net: fix up HMP NIC info string on reset
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 17 Sep 2013 08:45:36 +0000 (11:45 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 22 Sep 2013 06:30:22 +0000 (09:30 +0300)
When mac is updated on reset, info string has stale data.
Fix it up.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/net/virtio-net.c

index dd41008fb0e7b812b7ab255cbed2bde91ac2c097..22dbd053d494feac98a6f580e8809002e1bb750c 100644 (file)
@@ -314,6 +314,7 @@ static void virtio_net_reset(VirtIODevice *vdev)
     n->mac_table.uni_overflow = 0;
     memset(n->mac_table.macs, 0, MAC_TABLE_ENTRIES * ETH_ALEN);
     memcpy(&n->mac[0], &n->nic->conf->macaddr, sizeof(n->mac));
+    qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac);
     memset(n->vlans, 0, MAX_VLAN >> 3);
 }