libvirt/libxl-hvm-nic.patch

23 lines
723 B
Diff
Raw Normal View History

Index: libvirt-1.1.4/src/libxl/libxl_conf.c
===================================================================
--- libvirt-1.1.4.orig/src/libxl/libxl_conf.c
+++ libvirt-1.1.4/src/libxl/libxl_conf.c
@@ -883,8 +883,6 @@ libxlMakeNic(virDomainNetDefPtr l_nic, l
* x_nics[i].mtu = 1492;
*/
- libxl_device_nic_init(x_nic);
-
virMacAddrGetRaw(&l_nic->mac, x_nic->mac);
if (l_nic->model && !STREQ(l_nic->model, "netfront")) {
@@ -929,6 +927,8 @@ libxlMakeNicList(virDomainDefPtr def, l
return -1;
for (i = 0; i < nnics; i++) {
+ libxl_device_nic_init(&x_nics[i]);
+ x_nics[i].devid = i;
if (libxlMakeNic(l_nics[i], &x_nics[i]))
goto error;
}