On Thu, May 21, 2015 at 05:44:48PM +0800, Shannon Zhao wrote: > From: Shannon Zhao <shannon.z...@linaro.org> > > Currently QEMU dynamically generates mac address for the NIC which > doesn't specify the mac address. But when we hotplug a NIC without > specifying mac address, the mac address will increase for the same NIC > along with hotplug and hot-unplug, and at last it will overflow. And if > we codeplug one NIC with mac address e.g. "52:54:00:12:34:56", then > hotplug one NIC without specifying mac address and the mac address of > the hotplugged NIC is duplicate of "52:54:00:12:34:56". > > This patch add a mac_table to record the usage status and free the mac > address when the NIC is unrealized. > > Signed-off-by: Shannon Zhao <zhaoshengl...@huawei.com> > Signed-off-by: Shannon Zhao <shannon.z...@linaro.org> > --- > net/net.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---- > 1 file changed, 55 insertions(+), 4 deletions(-)
Thanks, applied to my net tree: https://github.com/stefanha/qemu/commits/net Stefan
pgpRDjWPgGRrj.pgp
Description: PGP signature