From 392640a61b27358080926c989d6d78cc1d1e50b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Wed, 15 Nov 2023 11:19:57 +0100 Subject: [PATCH] BUG/MINOR: quic: Malformed CONNECTION_CLOSE frame This bug arrived with this commit: MINOR: quic: Avoid zeroing frame structures Before this latter, the CONNECTION_CLOSE was zeroed, especially the "reason phrase length". Restablish this behavior. No need to backport. --- src/quic_tx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/quic_tx.c b/src/quic_tx.c index f6976bc0e..b1cfba6a8 100644 --- a/src/quic_tx.c +++ b/src/quic_tx.c @@ -2158,11 +2158,13 @@ static void qc_build_cc_frm(struct quic_conn *qc, struct quic_enc_level *qel, else { out->type = QUIC_FT_CONNECTION_CLOSE_APP; out->connection_close.error_code = qc->err.code; + out->connection_close.reason_phrase_len = 0; } } else { out->type = QUIC_FT_CONNECTION_CLOSE; out->connection_close.error_code = qc->err.code; + out->connection_close.reason_phrase_len = 0; } TRACE_LEAVE(QUIC_EV_CONN_BFRM, qc);