]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Add useful trace about pktns discarding
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 20 Sep 2021 09:18:24 +0000 (11:18 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 23 Sep 2021 13:27:25 +0000 (15:27 +0200)
It is important to know if the packet number spaces used during the
handshakes have really been discarding. If not, this may have a
significant impact on the packet loss detection.

src/xprt_quic.c

index 75ba788daef36abaec416ef1b2714b869cfb9f7a..2d79d9a2f4b315426e4443bbf889e8bc09c1e2f3 100644 (file)
@@ -2160,6 +2160,7 @@ static int qc_prep_hdshk_pkts(struct qring *qr, struct ssl_sock_ctx *ctx)
                        if (HA_ATOMIC_LOAD(&qc->state) == QUIC_HS_ST_CLIENT_INITIAL &&
                            pkt_type == QUIC_PACKET_TYPE_HANDSHAKE) {
                                quic_tls_discard_keys(&qc->els[QUIC_TLS_ENC_LEVEL_INITIAL]);
+                               TRACE_PROTO("discarding Initial pktns", QUIC_EV_CONN_PHPKTS, ctx->conn);
                                quic_pktns_discard(qc->els[QUIC_TLS_ENC_LEVEL_INITIAL].pktns, qc);
                                qc_set_timer(ctx);
                                HA_ATOMIC_STORE(&qc->state, QUIC_HS_ST_CLIENT_HANDSHAKE);
@@ -2739,6 +2740,7 @@ struct task *quic_conn_io_cb(struct task *t, void *context, unsigned int state)
            (prev_st == QUIC_HS_ST_SERVER_INITIAL || prev_st == QUIC_HS_ST_SERVER_HANDSHAKE)) {
                /* Discard the Handshake keys. */
                quic_tls_discard_keys(&qc->els[QUIC_TLS_ENC_LEVEL_HANDSHAKE]);
+               TRACE_PROTO("discarding Handshake pktns", QUIC_EV_CONN_PHPKTS, ctx->conn);
                quic_pktns_discard(qc->els[QUIC_TLS_ENC_LEVEL_HANDSHAKE].pktns, qc);
                qc_set_timer(ctx);
                if (!quic_build_post_handshake_frames(qc))