From: Frédéric Lécaille Date: Mon, 26 Jun 2023 13:57:39 +0000 (+0200) Subject: CLEANUP: quic: Remove server specific about Initial packet number space X-Git-Tag: v2.9-dev1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53caf351a9d66713750b353ee90b77c3bbc08122;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/quic_conn.c b/src/quic_conn.c index 9407b11455..f58c74e0e8 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. */