]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: Missing Initial packet dropping case
authorFrédéric Lécaille <flecaille@haproxy.com>
Fri, 5 Aug 2022 07:34:44 +0000 (09:34 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 5 Aug 2022 13:27:14 +0000 (15:27 +0200)
An Initial packet shorter than 1200 bytes must be dropped. The test was there
without the "goto drop"!

Must be backported to 2.6

src/xprt_quic.c

index c193c5f750bb707cc7b1208865e680cb277c1005..e754d9e92531d6c08a7da667aa97aa039cd79380 100644 (file)
@@ -5334,6 +5334,7 @@ static void qc_lstnr_pkt_rcv(unsigned char *buf, const unsigned char *end,
                         dgram->len < QUIC_INITIAL_PACKET_MINLEN) {
                        TRACE_PROTO("Too short datagram with an Initial packet", QUIC_EV_CONN_LPKT, qc);
                        HA_ATOMIC_INC(&prx_counters->too_short_initial_dgram);
+                       goto drop;
                }
 
                /* When multiple QUIC packets are coalesced on the same UDP datagram,