提交 702d66a8 编写于 作者: M Michael S. Tsirkin

virtio-net: fix up HMP NIC info string on reset

When mac is updated on reset, info string has stale data.
Fix it up.
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 9f1a029a
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册