]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Drop the packets of discarded packet number spaces
authorFrédéric Lécaille <flecaille@haproxy.com>
Tue, 22 Feb 2022 10:39:14 +0000 (11:39 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 1 Mar 2022 15:22:35 +0000 (16:22 +0100)
This is required since this previous commit:
   "MINOR: quic: Post handshake I/O callback switching"
If not, such packets remain endlessly in the RX buffer and cannot be parsed
by the new I/O callback used after the handshake has been confirmed.

src/xprt_quic.c

index 9e31a75bbe22f762b347db73eaa1b0940cd08f15..314ed2a9de639e1b36140c16883ccf3457f2aa25 100644 (file)
@@ -3144,8 +3144,10 @@ static int qc_qel_may_rm_hp(struct quic_conn *qc, struct quic_enc_level *qel)
        tel = ssl_to_quic_enc_level(qel->level);
 
        /* check if tls secrets are available */
-       if (qel->tls_ctx.rx.flags & QUIC_FL_TLS_SECRETS_DCD)
+       if (qel->tls_ctx.rx.flags & QUIC_FL_TLS_SECRETS_DCD) {
                TRACE_DEVEL("Discarded keys", QUIC_EV_CONN_TRMHP, qc);
+               return 0;
+       }
 
        if (!(qel->tls_ctx.rx.flags & QUIC_FL_TLS_SECRETS_SET))
                return 0;