From 6eed18568d985f5e091e96205f5ebf50fb823f4e Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Wed, 20 Jul 2011 12:20:22 +0200 Subject: net: Consistently use qemu_macaddr_default_if_unset Drop the open-coded MAC assignment from net_init_nic and replace it with standard qemu_macaddr_default_if_unset which is also used by qdev. That avoid creating colliding MACs when instantiating NICs via different mechanisms. This change requires to store the MAC as MACAddr in NICInfo, and the remaining nd_table users need to be updated. Based on suggestion by Peter Maydell. CC: Markus Armbruster CC: Peter Maydell Signed-off-by: Jan Kiszka Signed-off-by: Anthony Liguori --- net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net.h') diff --git a/net.h b/net.h index 4fdd942..5a7881c 100644 --- a/net.h +++ b/net.h @@ -129,7 +129,7 @@ int do_set_link(Monitor *mon, const QDict *qdict, QObject **ret_data); #define MAX_NICS 8 struct NICInfo { - uint8_t macaddr[6]; + MACAddr macaddr; char *model; char *name; char *devaddr; -- cgit v1.1