]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
migration: setup bi-directional I/O channel for exec: protocol
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 21 Apr 2017 11:12:20 +0000 (12:12 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 31 Jul 2017 21:42:57 +0000 (16:42 -0500)
Historically the migration data channel has only needed to be
unidirectional. Thus the 'exec:' protocol was requesting an
I/O channel with O_RDONLY on incoming side, and O_WRONLY on
the outgoing side.

This is fine for classic migration, but if you then try to run
TLS over it, this fails because the TLS handshake requires a
bi-directional channel.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
(cherry picked from commit 062d81f0e968fe1597474735f3ea038065027372)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
migration/exec.c

index 9157721dfe596e3a4a83a92a80b9ca8fb2b92c7a..aba9089466262e3fd824a08fb82b397696d0a525 100644 (file)
@@ -32,7 +32,7 @@ void exec_start_outgoing_migration(MigrationState *s, const char *command, Error
 
     trace_migration_exec_outgoing(command);
     ioc = QIO_CHANNEL(qio_channel_command_new_spawn(argv,
-                                                    O_WRONLY,
+                                                    O_RDWR,
                                                     errp));
     if (!ioc) {
         return;
@@ -59,7 +59,7 @@ void exec_start_incoming_migration(const char *command, Error **errp)
 
     trace_migration_exec_incoming(command);
     ioc = QIO_CHANNEL(qio_channel_command_new_spawn(argv,
-                                                    O_RDONLY,
+                                                    O_RDWR,
                                                     errp));
     if (!ioc) {
         return;