]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: quic: Remove server specific about Initial packet number space
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 26 Jun 2023 13:57:39 +0000 (15:57 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 30 Jun 2023 14:20:55 +0000 (16:20 +0200)
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

index 9407b1145599d532ff6a1b8056592839546055ed..f58c74e0e86e212c4d9374ea4d820974f456dd50 100644 (file)
@@ -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.
                 */