qemu-cr16/io
Daniel P. Berrangé 6a9e81b705 crypto: propagate Error object on premature termination
The way that premature termination was handled in TLS connections was
changed to handle an ordering problem during graceful shutdown in the
migration code.

Unfortunately one of the codepaths returned -1 to indicate an error
condition, but failed to set the 'errp' parameter.

This broke error handling in the qio_channel_tls_handshake function,
as the QTask callback would no longer see that an error was raised.
As a result, the client will go on to try to use the already closed
TLS connection, resulting in misleading errors.

This was evidenced in the I/O test 233 which showed changes such as

-qemu-nbd: Certificate does not match the hostname localhost
+qemu-nbd: Failed to read initial magic: Unable to read from socket: Connection reset by peer

Fixes: 7e0c22d585
Acked-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-10-24 13:04:31 +01:00
..
channel-buffer.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
channel-command.c treewide: use qemu_set_blocking instead of g_unix_set_fd_nonblocking 2025-09-19 12:46:07 +01:00
channel-file.c treewide: use qemu_set_blocking instead of g_unix_set_fd_nonblocking 2025-09-19 12:46:07 +01:00
channel-null.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
channel-socket.c error: Kill @error_warn 2025-10-01 08:33:24 +02:00
channel-tls.c crypto: propagate Error object on premature termination 2025-10-24 13:04:31 +01:00
channel-util.c io: follow coroutine AioContext in qio_channel_yield() 2023-09-07 20:32:11 -05:00
channel-watch.c error: Kill @error_warn 2025-10-01 08:33:24 +02:00
channel-websock.c treewide: handle result of qio_channel_set_blocking() 2025-09-19 12:46:07 +01:00
channel.c treewide: handle result of qio_channel_set_blocking() 2025-09-19 12:46:07 +01:00
dns-resolver.c io: Fix partial struct copy in qio_dns_resolver_lookup_sync_inet() 2025-05-22 11:24:41 +01:00
meson.build Revert "meson: Propagate gnutls dependency" 2024-07-03 18:41:26 +02:00
net-listener.c io: Stop appending -listen to net listeners 2023-11-07 14:54:56 +00:00
task.c io: Fix Lesser GPL version number 2020-10-29 09:57:37 +00:00
trace-events io: tls: Add qio_channel_tls_bye 2025-02-14 15:19:03 -03:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00