summaryrefslogtreecommitdiffstats
path: root/src/quic_rx.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/quic_rx.c32
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;
}