From 420446e6e4f6dbcf6b81c29dd190a3595fc5d2c29c6fc6d642948a8d92f1c6d5 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Mon, 4 Nov 2013 23:05:28 +0000 Subject: [PATCH] - Fix initialization of libxl NIC devices libxl-hvm-nic.patch bnc#848918 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=325 --- libvirt.changes | 7 +++++++ libvirt.spec | 2 ++ libxl-hvm-nic.patch | 22 ++++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 libxl-hvm-nic.patch diff --git a/libvirt.changes b/libvirt.changes index 64dd0a0..235bdb8 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Nov 4 15:44:39 MST 2013 - jfehlig@suse.com + +- Fix initialization of libxl NIC devices + libxl-hvm-nic.patch + bnc#848918 + ------------------------------------------------------------------- Wed Oct 30 08:35:47 MDT 2013 - jfehlig@suse.com diff --git a/libvirt.spec b/libvirt.spec index 58a6d58..69a23d6 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -426,6 +426,7 @@ Patch100: xen-name-for-devid.patch Patch101: clone.patch Patch102: xen-pv-cdrom.patch Patch103: libxl-hvm-vnc.patch +Patch104: libxl-hvm-nic.patch # Our patches Patch200: libvirtd-defaults.patch Patch201: libvirtd-init-script.patch @@ -955,6 +956,7 @@ of recent versions of Linux (and other OSes). %patch101 %patch102 -p1 %patch103 -p1 +%patch104 -p1 %patch200 -p1 %patch201 -p1 %patch202 -p1 diff --git a/libxl-hvm-nic.patch b/libxl-hvm-nic.patch new file mode 100644 index 0000000..74eb8e3 --- /dev/null +++ b/libxl-hvm-nic.patch @@ -0,0 +1,22 @@ +Index: libvirt-1.1.2/src/libxl/libxl_conf.c +=================================================================== +--- libvirt-1.1.2.orig/src/libxl/libxl_conf.c ++++ libvirt-1.1.2/src/libxl/libxl_conf.c +@@ -846,8 +846,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")) { +@@ -892,6 +890,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; + }