]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: do not reject PADDING followed by other frames
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 22 Nov 2021 14:22:48 +0000 (15:22 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 25 Nov 2021 10:13:12 +0000 (11:13 +0100)
It is valid for a QUIC packet to contain a PADDING frame followed by
one or several other frames.

quic_parse_padding_frame() does not require change as it detect properly
the end of the frame with the first non-null byte.

This allow to use quic-go implementation which uses a PADDING-CRYPTO as
the first handshake packet.

src/xprt_quic.c

index a13208214e7d97c5d0d723b523fb3e1da2a48d21..19c6958d37ee6865ef1731e66c5994341daa4cf4 100644 (file)
@@ -1998,10 +1998,6 @@ static int qc_parse_pkt_frms(struct quic_rx_packet *pkt, struct ssl_sock_ctx *ct
 
                switch (frm.type) {
                case QUIC_FT_PADDING:
-                       if (pos != end) {
-                               TRACE_DEVEL("wrong frame", QUIC_EV_CONN_PRSHPKT, ctx->conn, pkt);
-                               goto err;
-                       }
                        break;
                case QUIC_FT_PING:
                        break;