summaryrefslogtreecommitdiffhomepage
path: root/src/event/quic/ngx_event_quic_frames.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2023-01-31 15:26:33 +0400
committerRoman Arutyunyan <arut@nginx.com>2023-01-31 15:26:33 +0400
commitb7ccca0eb07ebf5f0a78c21cc45f7ac865dda986 (patch)
tree5c46b98592d5b5a4053fd5c84b918a008d34a38f /src/event/quic/ngx_event_quic_frames.c
parent341c21c9f6373ceeb0ad2513e14c5cd97e958b28 (diff)
downloadnginx-b7ccca0eb07ebf5f0a78c21cc45f7ac865dda986.tar.gz
nginx-b7ccca0eb07ebf5f0a78c21cc45f7ac865dda986.tar.bz2
QUIC: fixed broken token in NEW_TOKEN (ticket #2446).
Previously, since 3550b00d9dc8, the token was allocated on stack, to get rid of pool usage. Now the token is allocated by ngx_quic_copy_buffer() in QUIC buffers, also used for STREAM, CRYPTO and ACK frames.
Diffstat (limited to 'src/event/quic/ngx_event_quic_frames.c')
-rw-r--r--src/event/quic/ngx_event_quic_frames.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/event/quic/ngx_event_quic_frames.c b/src/event/quic/ngx_event_quic_frames.c
index 9fcc97e02..040b6182c 100644
--- a/src/event/quic/ngx_event_quic_frames.c
+++ b/src/event/quic/ngx_event_quic_frames.c
@@ -858,6 +858,20 @@ ngx_quic_log_frame(ngx_log_t *log, ngx_quic_frame_t *f, ngx_uint_t tx)
case NGX_QUIC_FT_NEW_TOKEN:
p = ngx_slprintf(p, last, "NEW_TOKEN");
+
+#ifdef NGX_QUIC_DEBUG_FRAMES
+ {
+ ngx_chain_t *cl;
+
+ p = ngx_slprintf(p, last, " token:");
+
+ for (cl = f->data; cl; cl = cl->next) {
+ p = ngx_slprintf(p, last, "%*xs",
+ cl->buf->last - cl->buf->pos, cl->buf->pos);
+ }
+ }
+#endif
+
break;
case NGX_QUIC_FT_HANDSHAKE_DONE: