changeset 8317:435fed8e2489 quic

Logging of packet numbers in QUIC packet creation.
author Sergey Kandaurov <pluknet@nginx.com>
date Sat, 04 Apr 2020 17:34:04 +0300
parents 0dc0552335bd
children 1bb5e8538d0c
files src/event/ngx_event_quic_protection.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/event/ngx_event_quic_protection.c
+++ b/src/event/ngx_event_quic_protection.c
@@ -673,6 +673,10 @@ ngx_quic_create_long_packet(ngx_quic_hea
         return NGX_ERROR;
     }
 
+    ngx_log_debug3(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
+                   "ngx_quic_create_long_packet: number %L, encoded %d:0x%xD",
+                   pkt->number, (int) pkt->num_len, pkt->trunc);
+
     ngx_memcpy(nonce, pkt->secret->iv.data, pkt->secret->iv.len);
     ngx_quic_compute_nonce(nonce, sizeof(nonce), pkt->number);
 
@@ -731,6 +735,10 @@ ngx_quic_create_short_packet(ngx_quic_he
         return NGX_ERROR;
     }
 
+    ngx_log_debug3(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
+                   "ngx_quic_create_short_packet: number %L, encoded %d:0x%xD",
+                   pkt->number, (int) pkt->num_len, pkt->trunc);
+
     ngx_memcpy(nonce, pkt->secret->iv.data, pkt->secret->iv.len);
     ngx_quic_compute_nonce(nonce, sizeof(nonce), pkt->number);