"Daniel P. Berrange" <berra...@redhat.com> wrote: > On Mon, Jul 17, 2017 at 03:42:23PM +0200, Juan Quintela wrote: >> We need to receive the ioc to be able to implement multifd. >> >> Signed-off-by: Juan Quintela <quint...@redhat.com> >> --- >> migration/channel.c | 3 +-- >> migration/migration.c | 16 +++++++++++++--- >> migration/migration.h | 2 ++ >> 3 files changed, 16 insertions(+), 5 deletions(-) >> >> diff --git a/migration/channel.c b/migration/channel.c >> index 719055d..5b777ef 100644 >> --- a/migration/channel.c >> +++ b/migration/channel.c >> @@ -36,8 +36,7 @@ gboolean migration_channel_process_incoming(QIOChannel >> *ioc) >> error_report_err(local_err); >> } >> } else { >> - QEMUFile *f = qemu_fopen_channel_input(ioc); >> - migration_fd_process_incoming(f); >> + return migration_ioc_process_incoming(ioc); >> } >> return FALSE; /* unregister */ >> } > > This is going to break TLS with multi FD I'm afraid. > > > We have two code paths: > > 1. Non-TLS > > event loop POLLIN on migration listener socket > +-> socket_accept_incoming_migration() > +-> migration_channel_process_incoming() > +-> migration_ioc_process_incoming() > -> returns FALSE if all required FD channels are now present > > 2. TLS > > event loop POLLIN on migration listener socket > +-> socket_accept_incoming_migration() > +-> migration_channel_process_incoming() > +-> migration_tls_channel_process_incoming > -> Registers watch for TLS handhsake on client socket > -> returns FALSE immediately to remove listener watch > > event loop POLLIN on migration *client* socket > +-> migration_tls_incoming_handshake > +-> migration_channel_process_incoming() > +-> migration_ioc_process_incoming() > -> return value ignored >
The part of the cover letter when I explained that TLS was not working and asked for help was not chopped for user error. I *think* that is fixed this correctly. As this worked differently than I expected, I just changed how things were done. Thanks, Juan.