- io: remove io watch if TLS channel is closed during handshake - hw/ssi: Fix Linux driver init issue with xilinx_spi - chardev: report the handshake error - vhost: Drop unused eventfd_add|del hooks - virtio-iommu: use-after-free fix - hw/arm/virt: Check for attempt to use TrustZone with KVM or HVF - hw/rx: rx-gdbsim DTB load address aligned of 16byte - vhost-user: Use correct macro name TARGET_PPC64 - accel/kvm: Make kvm_dirty_ring_reaper_init() void - accel/kvm: Free as when an error occurred Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com>
59 lines
1.9 KiB
Diff
59 lines
1.9 KiB
Diff
From 30f9cc7263e44faf2b43c4fdf3d7c64ffb409502 Mon Sep 17 00:00:00 2001
|
|
From: qihao <qihao_yewu@cmss.chinamobile.com>
|
|
Date: Mon, 14 Aug 2023 14:37:36 +0800
|
|
Subject: [PATCH] chardev: report the handshake error
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
cheery-pick from 81cd34a359a36656d2f6542226235bd318ff8873
|
|
|
|
This can help to debug connection issues.
|
|
|
|
Related to:
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=2196182
|
|
|
|
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
Message-Id: <20230510072531.3937189-1-marcandre.lureau@redhat.com>
|
|
Signed-off-by: qihao_yewu <qihao_yewu@cmss.chinamobile.com>
|
|
---
|
|
chardev/char-socket.c | 12 ++++++++++--
|
|
1 file changed, 10 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/chardev/char-socket.c b/chardev/char-socket.c
|
|
index 459b9b72bd..ef5d3053f3 100644
|
|
--- a/chardev/char-socket.c
|
|
+++ b/chardev/char-socket.c
|
|
@@ -819,8 +819,12 @@ static void tcp_chr_websock_handshake(QIOTask *task, gpointer user_data)
|
|
{
|
|
Chardev *chr = user_data;
|
|
SocketChardev *s = user_data;
|
|
+ Error *err = NULL;
|
|
|
|
- if (qio_task_propagate_error(task, NULL)) {
|
|
+ if (qio_task_propagate_error(task, &err)) {
|
|
+ error_reportf_err(err,
|
|
+ "websock handshake of character device %s failed: ",
|
|
+ chr->label);
|
|
tcp_chr_disconnect(chr);
|
|
} else {
|
|
if (s->do_telnetopt) {
|
|
@@ -855,8 +859,12 @@ static void tcp_chr_tls_handshake(QIOTask *task,
|
|
{
|
|
Chardev *chr = user_data;
|
|
SocketChardev *s = user_data;
|
|
+ Error *err = NULL;
|
|
|
|
- if (qio_task_propagate_error(task, NULL)) {
|
|
+ if (qio_task_propagate_error(task, &err)) {
|
|
+ error_reportf_err(err,
|
|
+ "TLS handshake of character device %s failed: ",
|
|
+ chr->label);
|
|
tcp_chr_disconnect(chr);
|
|
} else {
|
|
if (s->is_websock) {
|
|
--
|
|
2.41.0.windows.1
|
|
|