]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: hotplug: Fix TLS setup on disk hotplug
authorPeter Krempa <pkrempa@redhat.com>
Fri, 1 Jun 2018 15:21:02 +0000 (17:21 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 5 Jun 2018 06:14:00 +0000 (08:14 +0200)
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 <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_hotplug.c

index 7dc9276ff75b7eac373e85fd4f667e702b3c25ba..6c1210ddbb60267f0421ccdd3c309eecd5b0ba05 100644 (file)
@@ -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;