]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: add useful trace about padding params values
authorFrederic Lecaille <flecaille@haproxy.com>
Thu, 4 Sep 2025 07:18:08 +0000 (09:18 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Fri, 5 Sep 2025 14:17:11 +0000 (16:17 +0200)
When adding a PADDING frame for too short packets, add a trace about variable
values whose this PADDING frame length depends on.

src/quic_tx.c

index 4f003240fba99da8e2c335d2d1fd24dd71221bfa..8a8f05dc37da1c55aa8a8058725eab0eec9b837c 100644 (file)
@@ -1996,6 +1996,10 @@ static int qc_do_build_pkt(unsigned char *pos, const unsigned char *end,
         */
        if (*pn_len + len < QUIC_PACKET_PN_MAXLEN + QUIC_HP_SAMPLE_LEN) {
                padding_len = QUIC_PACKET_PN_MAXLEN + QUIC_HP_SAMPLE_LEN - (*pn_len + len);
+               TRACE_PRINTF(TRACE_LEVEL_DEVELOPER, QUIC_EV_CONN_PHPKTS, qc, 0, 0, 0,
+                            "adding padding pn=%llu padding_len=%zu *pn_len=%zu"
+                            " len=%zu len_frms=%zu",
+                            (ull)pn, padding_len, *pn_len, len, len_frms);
                len += padding_len;
        }