Revision c963530a net/net.c
b/net/net.c | ||
---|---|---|
157 | 157 |
/** |
158 | 158 |
* Generate a name for net client |
159 | 159 |
* |
160 |
* Only net clients created with the legacy -net option need this. Naming is |
|
161 |
* mandatory for net clients created with -netdev. |
|
160 |
* Only net clients created with the legacy -net option and NICs need this. |
|
162 | 161 |
*/ |
163 | 162 |
static char *assign_name(NetClientState *nc1, const char *model) |
164 | 163 |
{ |
... | ... | |
170 | 169 |
if (nc == nc1) { |
171 | 170 |
continue; |
172 | 171 |
} |
173 |
/* For compatibility only bump id for net clients on a vlan */ |
|
174 |
if (strcmp(nc->model, model) == 0 && |
|
175 |
net_hub_id_for_client(nc, NULL) == 0) { |
|
172 |
if (strcmp(nc->model, model) == 0) { |
|
176 | 173 |
id++; |
177 | 174 |
} |
178 | 175 |
} |
Also available in: Unified diff