]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Add short packet key phase bit values to traces
authorFrédéric Lécaille <flecaille@haproxy.com>
Tue, 5 Apr 2022 13:29:14 +0000 (15:29 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 8 Apr 2022 13:38:29 +0000 (15:38 +0200)
This is useful to diagnose key update related issues.

src/xprt_quic.c

index aa388a2e25edf5dedaabe6b3efb4d3b23323c5a6..e1cdc72e8ccc6e9794757b0aef1da1a84fba7952 100644 (file)
@@ -348,8 +348,12 @@ static void quic_trace(enum trace_level level, uint64_t mask, const struct trace
                        const SSL *ssl = a4;
 
                        if (pkt) {
-                               chunk_appendf(&trace_buf, " pkt@%p el=%c",
-                                             pkt, quic_packet_type_enc_level_char(pkt->type));
+                               chunk_appendf(&trace_buf, " pkt@%p", pkt);
+                               if (pkt->type == QUIC_PACKET_TYPE_SHORT && pkt->data)
+                                       chunk_appendf(&trace_buf, " kp=%d",
+                                                     !!(*pkt->data & QUIC_PACKET_KEY_PHASE_BIT));
+                               chunk_appendf(&trace_buf, " el=%c",
+                                             quic_packet_type_enc_level_char(pkt->type));
                                if (pkt->pnl)
                                        chunk_appendf(&trace_buf, " pnl=%u pn=%llu", pkt->pnl,
                                                      (unsigned long long)pkt->pn);