libvirt/libxl-hvm-nic.patch

23 lines
723 B
Diff
Raw Normal View History

Index: libvirt-1.2.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-1.2.0.orig/src/libxl/libxl_conf.c
+++ libvirt-1.2.0/src/libxl/libxl_conf.c
@@ -886,8 +886,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")) {
@@ -932,6 +930,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;
}