diff src/event/quic/ngx_event_quic_frames.c @ 9072:def8e398d7c5 quic

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.
author Roman Arutyunyan <arut@nginx.com>
date Tue, 31 Jan 2023 15:26:33 +0400
parents 3c98fa8fef6f
children 8f2f40d3fd18
line wrap: on
line diff
--- a/src/event/quic/ngx_event_quic_frames.c	Tue Jan 31 14:12:18 2023 +0400
+++ b/src/event/quic/ngx_event_quic_frames.c	Tue Jan 31 15:26:33 2023 +0400
@@ -858,6 +858,20 @@
 
     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: