]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: Unckecked encryption levels availability
authorFrédéric Lécaille <flecaille@haproxy.com>
Tue, 18 Jul 2023 09:44:06 +0000 (11:44 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Tue, 18 Jul 2023 09:50:31 +0000 (11:50 +0200)
This bug arrived with this commit:

   MEDIUM: quic: Dynamic allocations of QUIC TLS encryption levels

It is possible that haproxy receives a late Initial packet after it has
released its Initial or Handshake encryption levels. In this case
it must not try to retransmit packets from such encryption levels to
speed up the handshake completion.

No need to backport.

src/quic_conn.c

index f3891f12f7299578fbcc2fc750ede8cc48ef8422..5ec8f0d9e092ed5a2d0c9e4333fb4e656f731b42 100644 (file)
@@ -3328,7 +3328,7 @@ static int qc_parse_pkt_frms(struct quic_conn *qc, struct quic_rx_packet *pkt,
        /* Flag this packet number space as having received a packet. */
        qel->pktns->flags |= QUIC_FL_PKTNS_PKT_RECEIVED;
 
-       if (fast_retrans) {
+       if (fast_retrans && qc->iel && qc->hel) {
                struct quic_enc_level *iqel = qc->iel;
                struct quic_enc_level *hqel = qc->hel;