mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
qemu: Correctly label migration TCP socket
This commit is contained in:
parent
520d91f8bd
commit
855f768996
@ -1624,11 +1624,14 @@ static int doNativeMigrate(struct qemud_driver *driver,
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
if (virSecurityManagerSetSocketLabel(driver->securityManager, vm) < 0)
|
||||
goto cleanup;
|
||||
if (virNetSocketNewConnectTCP(uribits->server, tmp, &sock) == 0) {
|
||||
spec.dest.fd.qemu = virNetSocketDupFD(sock, true);
|
||||
virNetSocketFree(sock);
|
||||
}
|
||||
if (spec.dest.fd.qemu == -1)
|
||||
if (virSecurityManagerClearSocketLabel(driver->securityManager, vm) < 0 ||
|
||||
spec.dest.fd.qemu == -1)
|
||||
goto cleanup;
|
||||
} else {
|
||||
spec.destType = MIGRATION_DEST_HOST;
|
||||
|
Loading…
x
Reference in New Issue
Block a user