diff --git a/libvirt-suse-netcontrol.patch b/libvirt-suse-netcontrol.patch index 1cb9bcc..8e3fc30 100644 --- a/libvirt-suse-netcontrol.patch +++ b/libvirt-suse-netcontrol.patch @@ -145,6 +145,26 @@ Index: libvirt-1.2.13/src/interface/interface_backend_netcf.c /* open netcf */ if (ncf_init(&driver->netcf, NULL) != 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", +@@ -1146,6 +1186,19 @@ static virStateDriver interfaceStateDriv + + int netcfIfaceRegister(void) + { ++ struct netcf *netcf; ++ ++ /* Initialization of libnetcontrol will fail if NetworkManager is enabled. ++ * Skip registration if ncf_init fails. ++ * TODO: finer-grained check? E.g. is_nm_enabled() ++ */ ++ if (ncf_init(&netcf, NULL) != 0) { ++ VIR_WARN("Failed to intialize libnetcontrol. Management of interface devices is disabled"); ++ return 0; ++ } ++ ++ ncf_close(netcf); ++ + if (virSetSharedInterfaceDriver(&interfaceDriver) < 0) + return -1; + if (virRegisterStateDriver(&interfaceStateDriver) < 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 2bf41ab..594d1a9 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Mar 25 09:10:46 MDT 2015 - jfehlig@suse.com + +- Disable interface driver if libnetcontrol cannot be initialized + Modified libvirt-suse-netcontrol.patch + boo#920551 + ------------------------------------------------------------------- Mon Mar 16 17:17:49 MDT 2015 - jfehlig@suse.com