diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:20:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:20:34 +0000 |
commit | f3bb08bb1d94c77704371f8546a739119f0a05b4 (patch) | |
tree | 5dfb47fa424ecde655f8950098411a311e9296e6 /src/quic_rx.c | |
parent | Releasing progress-linux version 2.9.6-1~progress7.99u1. (diff) | |
download | haproxy-f3bb08bb1d94c77704371f8546a739119f0a05b4.tar.xz haproxy-f3bb08bb1d94c77704371f8546a739119f0a05b4.zip |
Merging upstream version 2.9.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/quic_rx.c')
-rw-r--r-- | src/quic_rx.c | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/src/quic_rx.c b/src/quic_rx.c index 9e55aa3..585c71a 100644 --- a/src/quic_rx.c +++ b/src/quic_rx.c @@ -719,29 +719,7 @@ static int qc_handle_crypto_frm(struct quic_conn *qc, crypto_frm->offset = cstream->rx.offset; } - if (crypto_frm->offset == cstream->rx.offset && ncb_is_empty(ncbuf)) { - struct qf_crypto *qf_crypto; - - qf_crypto = pool_alloc(pool_head_qf_crypto); - if (!qf_crypto) { - TRACE_ERROR("CRYPTO frame allocation failed", QUIC_EV_CONN_PRSHPKT, qc); - goto leave; - } - - qf_crypto->offset = crypto_frm->offset; - qf_crypto->len = crypto_frm->len; - qf_crypto->data = crypto_frm->data; - qf_crypto->qel = qel; - LIST_APPEND(&qel->rx.crypto_frms, &qf_crypto->list); - - cstream->rx.offset += crypto_frm->len; - HA_ATOMIC_OR(&qc->wait_event.tasklet->state, TASK_HEAVY); - TRACE_DEVEL("increment crypto level offset", QUIC_EV_CONN_PHPKTS, qc, qel); - goto done; - } - - if (!quic_get_ncbuf(ncbuf) || - ncb_is_null(ncbuf)) { + if (!quic_get_ncbuf(ncbuf) || ncb_is_null(ncbuf)) { TRACE_ERROR("CRYPTO ncbuf allocation failed", QUIC_EV_CONN_PRSHPKT, qc); goto leave; } @@ -1048,6 +1026,14 @@ static int qc_parse_pkt_frms(struct quic_conn *qc, struct quic_rx_packet *pkt, if (qc_is_listener(qc)) { TRACE_ERROR("non accepted QUIC_FT_HANDSHAKE_DONE frame", QUIC_EV_CONN_PRSHPKT, qc); + + /* RFC 9000 19.20. HANDSHAKE_DONE Frames + * + * A + * server MUST treat receipt of a HANDSHAKE_DONE frame as a connection + * error of type PROTOCOL_VIOLATION. + */ + quic_set_connection_close(qc, quic_err_transport(QC_ERR_PROTOCOL_VIOLATION)); goto leave; } |