mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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();
|
virReportOOMError();
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
if (virSecurityManagerSetSocketLabel(driver->securityManager, vm) < 0)
|
||||||
|
goto cleanup;
|
||||||
if (virNetSocketNewConnectTCP(uribits->server, tmp, &sock) == 0) {
|
if (virNetSocketNewConnectTCP(uribits->server, tmp, &sock) == 0) {
|
||||||
spec.dest.fd.qemu = virNetSocketDupFD(sock, true);
|
spec.dest.fd.qemu = virNetSocketDupFD(sock, true);
|
||||||
virNetSocketFree(sock);
|
virNetSocketFree(sock);
|
||||||
}
|
}
|
||||||
if (spec.dest.fd.qemu == -1)
|
if (virSecurityManagerClearSocketLabel(driver->securityManager, vm) < 0 ||
|
||||||
|
spec.dest.fd.qemu == -1)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
} else {
|
} else {
|
||||||
spec.destType = MIGRATION_DEST_HOST;
|
spec.destType = MIGRATION_DEST_HOST;
|
||||||
|
Loading…
Reference in New Issue
Block a user