From: Peter Krempa Date: Fri, 1 Jun 2018 15:21:02 +0000 (+0200) Subject: qemu: hotplug: Fix TLS setup on disk hotplug X-Git-Tag: v4.5.0-rc1~297 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c495905bff602c9b0db665f3cf5997721bfbff2b;p=thirdparty%2Flibvirt.git qemu: hotplug: Fix TLS setup on disk hotplug We need to check if TLS is enabled as the variable is a tristate. Currently we'd setup TLS even if it was explicitly turned off. Thankfully TLS for disks was only used with the vxhs protocol so hardly anybody would ever be able to hit the problem. Signed-off-by: Peter Krempa Reviewed-by: Jiri Denemark --- diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 7dc9276ff7..6c1210ddbb 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -468,7 +468,7 @@ qemuDomainAttachDiskGeneric(virQEMUDriverPtr driver, else if (rv > 0) prdStarted = true; - if (disk->src->haveTLS && + if (disk->src->haveTLS == VIR_TRISTATE_BOOL_YES && qemuDomainAddDiskSrcTLSObject(driver, vm, disk->src) < 0) goto error;