aboutsummaryrefslogtreecommitdiff
path: root/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'net.c')
-rw-r--r--net.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net.c b/net.c
index 9f9e3632ac..5b092c7482 100644
--- a/net.c
+++ b/net.c
@@ -2103,7 +2103,7 @@ int net_client_init(Monitor *mon, const char *device, const char *p)
}
if (!strcmp(device, "nic")) {
static const char * const nic_params[] = {
- "vlan", "name", "macaddr", "model", NULL
+ "vlan", "name", "macaddr", "model", "addr", NULL
};
NICInfo *nd;
uint8_t *macaddr;
@@ -2138,6 +2138,9 @@ int net_client_init(Monitor *mon, const char *device, const char *p)
if (get_param_value(buf, sizeof(buf), "model", p)) {
nd->model = strdup(buf);
}
+ if (get_param_value(buf, sizeof(buf), "addr", p)) {
+ nd->devaddr = strdup(buf);
+ }
nd->vlan = vlan;
nd->name = name;
nd->used = 1;