Skip to content

Commit e6c791b

Browse files
committed
MINOR: quic: add useful trace about padding params values
When adding a PADDING frame for too short packets, add a trace about variable values whose this PADDING frame length depends on.
1 parent bb407ba commit e6c791b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/quic_tx.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1996,6 +1996,10 @@ static int qc_do_build_pkt(unsigned char *pos, const unsigned char *end,
19961996
*/
19971997
if (*pn_len + len < QUIC_PACKET_PN_MAXLEN + QUIC_HP_SAMPLE_LEN) {
19981998
padding_len = QUIC_PACKET_PN_MAXLEN + QUIC_HP_SAMPLE_LEN - (*pn_len + len);
1999+
TRACE_PRINTF(TRACE_LEVEL_DEVELOPER, QUIC_EV_CONN_PHPKTS, qc, 0, 0, 0,
2000+
"adding padding pn=%llu padding_len=%zu *pn_len=%zu"
2001+
" len=%zu len_frms=%zu",
2002+
(ull)pn, *pn_len, padding_len, len, len_frms);
19992003
len += padding_len;
20002004
}
20012005

0 commit comments

Comments
 (0)