From e456a7adb98c7123924a706103b6213c4e1accf29e3e0c8f041eb24095665aa0 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Wed, 18 Mar 2015 18:17:20 +0000 Subject: [PATCH] Accepting request 291345 from home:jfehlig:branches:Virtualization - Fix crash in libnetcontrol-backed interface driver Modified libvirt-suse-netcontrol.patch boo#920551 OBS-URL: https://build.opensuse.org/request/show/291345 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=446 --- libvirt-suse-netcontrol.patch | 24 ++---------------------- libvirt.changes | 7 +++++++ 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/libvirt-suse-netcontrol.patch b/libvirt-suse-netcontrol.patch index 98d8dea..1cb9bcc 100644 --- a/libvirt-suse-netcontrol.patch +++ b/libvirt-suse-netcontrol.patch @@ -134,37 +134,17 @@ Index: libvirt-1.2.13/src/interface/interface_backend_netcf.c static void virNetcfDriverStateDispose(void *obj) -@@ -87,7 +123,22 @@ netcfStateInitialize(bool privileged ATT +@@ -87,6 +123,10 @@ netcfStateInitialize(bool privileged ATT if (!(driver = virObjectLockableNew(virNetcfDriverStateClass))) return -1; +#ifdef WITH_NETCONTROL + nc_logger_redirect_to(interface_nc_log_driver); ++#endif + /* open netcf */ -+ /* Note: On SUSE, ncf_init will fail if Network Manager is enabled. Ignore -+ * the failure so libvirtd will still start. Connections to the driver will -+ * fail in netcfInterfaceOpen. This restores the behavior before -+ * commit 822fe136. -+ */ -+ if (ncf_init(&driver->netcf, NULL) != 0) { -+ VIR_WARN("Failed to initialize netcontrol. Continuing with network " -+ "interface management features disabled"); -+ virObjectUnref(driver); -+ driver = NULL; -+ } -+#else if (ncf_init(&driver->netcf, NULL) != 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("failed to initialize netcf")); -@@ -95,6 +146,7 @@ netcfStateInitialize(bool privileged ATT - driver = NULL; - return -1; - } -+#endif - return 0; - } - Index: libvirt-1.2.13/src/interface/interface_driver.c =================================================================== --- libvirt-1.2.13.orig/src/interface/interface_driver.c diff --git a/libvirt.changes b/libvirt.changes index 97c91f3..2bf41ab 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Mar 16 17:17:49 MDT 2015 - jfehlig@suse.com + +- Fix crash in libnetcontrol-backed interface driver + Modified libvirt-suse-netcontrol.patch + boo#920551 + ------------------------------------------------------------------- Thu Mar 12 07:48:35 UTC 2015 - fcastelli@suse.com