From 53caf351a9d66713750b353ee90b77c3bbc08122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Mon, 26 Jun 2023 15:57:39 +0200 Subject: [PATCH] CLEANUP: quic: Remove server specific about Initial packet number space Remove a code section about the QUIC client Initial packet number space dropping. Should be backported as far as 2.6 to ease future backports to come. --- src/quic_conn.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/quic_conn.c b/src/quic_conn.c index 9407b1145..f58c74e0e 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -3692,19 +3692,6 @@ static int qc_prep_pkts(struct quic_conn *qc, struct buffer *buf, /* Let's say we have to build a new dgram */ prv_pkt = NULL; dglen += cur_pkt->len; - /* Client: discard the Initial encryption keys as soon as - * a handshake packet could be built. - */ - if (qc->state == QUIC_HS_ST_CLIENT_INITIAL && - pkt_type == QUIC_PACKET_TYPE_HANDSHAKE) { - quic_tls_discard_keys(qc->iel); - TRACE_PROTO("discarding Initial pktns", QUIC_EV_CONN_PHPKTS, qc); - quic_pktns_discard(qc->iel->pktns, qc); - qc_set_timer(qc); - qc_el_rx_pkts_del(qc->iel); - qc_release_pktns_frms(qc, qc->iel->pktns); - qc->state = QUIC_HS_ST_CLIENT_HANDSHAKE; - } /* If the data for the current encryption level have all been sent, * select the next level. */