From 61454f5a52a9a0f086611eff61dce9305b0e1e88 Mon Sep 17 00:00:00 2001 From: Frederic Lecaille Date: Fri, 5 Jan 2024 15:45:17 +0100 Subject: [PATCH] MINOR: quic-be: Prevent the MUX to send/receive data Such actions must be interrupted until the handshake completion. --- src/xprt_quic.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/xprt_quic.c b/src/xprt_quic.c index 1575f3645..8244bf02c 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -155,8 +155,13 @@ static int qc_xprt_start(struct connection *conn, void *ctx) qc = conn->handle.qc; TRACE_ENTER(QUIC_EV_CONN_NEW, qc); - /* mux-quic can now be considered ready. */ - qc->mux_state = QC_MUX_READY; + if (objt_listener(conn->target)) { + /* mux-quic can now be considered ready. */ + qc->mux_state = QC_MUX_READY; + } + else { + conn->flags |= CO_FL_SSL_WAIT_HS | CO_FL_WAIT_L6_CONN; + } /* Schedule quic-conn to ensure post handshake frames are emitted. This * is not done for 0-RTT as xprt->start happens before handshake