]> git.kaiwu.me - nginx.git/commitdiff
QUIC: adjusted minimum packet size to send Stateless Reset.
authorSergey Kandaurov <pluknet@nginx.com>
Fri, 20 Feb 2026 14:59:06 +0000 (18:59 +0400)
committerRoman Arutyunyan <arutyunyan.roman@gmail.com>
Tue, 24 Mar 2026 18:33:23 +0000 (22:33 +0400)
Now to be valid, it also assumes the Connection ID we require from a client.

src/event/quic/ngx_event_quic_output.c

index 01f1f911324039350fea47f072d1bfae3eb7c952..789eff9dc81efa71790add10cbd3595dc1e8ae42 100644 (file)
@@ -25,7 +25,7 @@
  * packets.  With the set of AEAD functions defined in [QUIC-TLS],
  * short header packets that are smaller than 21 bytes are never valid.
  */
-#define NGX_QUIC_MIN_PKT_LEN             21
+#define NGX_QUIC_MIN_PKT_LEN             41 /* 21 + 20 (server cid length) */
 
 #define NGX_QUIC_MIN_SR_PACKET           43 /* 5 rand + 16 srt + 22 padding */
 #define NGX_QUIC_MAX_SR_PACKET         1200