MINOR: quic: Add trace for QUIC_EV_CONN_IO_CB event.
authorFrederic Lecaille <flecaille@haproxy.com>
Fri, 30 Aug 2024 13:25:16 +0000 (15:25 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Thu, 5 Sep 2024 14:25:26 +0000 (16:25 +0200)
Dump the early data status from QUIC_EV_CONN_IO_CB trace event.
This is very helpful to know if the QUIC server has accepted the
early data received from clients.

(cherry picked from commit 8854cef03672235addec6f3baafcc44f0e0441f4)
Signed-off-by: Frederic Lecaille <flecaille@haproxy.com>

src/quic_trace.c

index bd7a886..fdea495 100644 (file)
@@ -13,6 +13,7 @@
 #include <inttypes.h>
 
 #include <haproxy/quic_conn.h>
+#include <haproxy/quic_ssl.h>
 #include <haproxy/quic_tls.h>
 #include <haproxy/quic_trace.h>
 #include <haproxy/quic_tp.h>
@@ -258,9 +259,13 @@ static void quic_trace(enum trace_level level, uint64_t mask, const struct trace
 
                if (mask & QUIC_EV_CONN_IO_CB) {
                        const enum quic_handshake_state *state = a2;
+                       const SSL *ssl = a3;
 
                        if (state)
                                chunk_appendf(&trace_buf, " state=%s", quic_hdshk_state_str(*state));
+                       if (ssl)
+                               chunk_appendf(&trace_buf, " early_data_status=%s",
+                                             quic_ssl_early_data_status_str(ssl));
                }
 
                if (mask & (QUIC_EV_CONN_TRMHP|QUIC_EV_CONN_ELRMHP|QUIC_EV_CONN_SPKT)) {