]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: wrong QUIC_FT_CONNECTION_CLOSE(0x1c) frame encoding
authorFrederic Lecaille <flecaille@haproxy.com>
Mon, 23 Jun 2025 14:52:09 +0000 (16:52 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Thu, 26 Jun 2025 07:48:00 +0000 (09:48 +0200)
This is an old bug which was there since this commit:

     MINOR: quic: Avoid zeroing frame structures

It seems QUIC_FT_CONNECTION_CLOSE was confused with QUIC_FT_CONNECTION_CLOSE_APP
which does not include a "frame type" field. This field was not initialized
(so with a random value) which prevent the packet to be built because the
packet builder supposes the packet with such frames are very short.

Must be backported as far as 2.6.

src/quic_tx.c

index e36bb2fdfc2066b187a9c99df8cf6aa5351500ea..611788b153d79d59127eb0845301b3634e17e300 100644 (file)
@@ -1685,6 +1685,7 @@ static void qc_build_cc_frm(struct quic_conn *qc, struct quic_enc_level *qel,
                         * converting to a CONNECTION_CLOSE of type 0x1c.
                         */
                        out->type = QUIC_FT_CONNECTION_CLOSE;
+                       out->connection_close.frame_type = 0;
                        out->connection_close.error_code = QC_ERR_APPLICATION_ERROR;
                        out->connection_close.reason_phrase_len = 0;
                }
@@ -1696,6 +1697,7 @@ static void qc_build_cc_frm(struct quic_conn *qc, struct quic_enc_level *qel,
        }
        else {
                out->type = QUIC_FT_CONNECTION_CLOSE;
+               out->connection_close.frame_type = 0;
                out->connection_close.error_code = qc->err.code;
                out->connection_close.reason_phrase_len = 0;
        }