]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: Malformed CONNECTION_CLOSE frame
authorFrédéric Lécaille <flecaille@haproxy.com>
Wed, 15 Nov 2023 10:19:57 +0000 (11:19 +0100)
committerFrédéric Lécaille <flecaille@haproxy.com>
Fri, 17 Nov 2023 16:31:42 +0000 (17:31 +0100)
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

index f6976bc0e3cb55202c10655a2c94d2b8fcef393d..b1cfba6a89a708e75d7a387050cfd345dce2008b 100644 (file)
@@ -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);