]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Do not expect to receive only one O-RTT packet
authorFrédéric Lécaille <flecaille@haproxy.com>
Fri, 17 Dec 2021 17:24:16 +0000 (18:24 +0100)
committerFrédéric Lécaille <flecaille@haproxy.com>
Mon, 20 Dec 2021 16:33:51 +0000 (17:33 +0100)
There is nothing about this in the RFC. We must support to receive
several 0-RTT packets before the handshake has completed.

src/xprt_quic.c

index 9d5f6ebafcf2a0a368faba2f7626d2f54cdd1d03..3f63cd3f8038c2135878871d3ee97aee4acccbed 100644 (file)
@@ -3091,7 +3091,9 @@ struct task *quic_conn_io_cb(struct task *t, void *context, unsigned int state)
        st = HA_ATOMIC_LOAD(&qc->state);
        TRACE_ENTER(QUIC_EV_CONN_HDSHK, ctx->conn, &st);
        ssl_err = SSL_ERROR_NONE;
-       zero_rtt = !MT_LIST_ISEMPTY(&qc->els[QUIC_TLS_ENC_LEVEL_EARLY_DATA].rx.pqpkts);
+       zero_rtt = st < QUIC_HS_ST_COMPLETE &&
+               (!MT_LIST_ISEMPTY(&qc->els[QUIC_TLS_ENC_LEVEL_EARLY_DATA].rx.pqpkts) ||
+               qc_el_rx_pkts(&qc->els[QUIC_TLS_ENC_LEVEL_EARLY_DATA]));
  start:
        if (!quic_get_tls_enc_levels(&tel, &next_tel, st, zero_rtt))
                goto err;