]> 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)
committerSergey Kandaurov <s.kandaurov@f5.com>
Thu, 26 Feb 2026 14:05:07 +0000 (18:05 +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 8c33505048b6ee72503a1de29d82f9325eff27dd..25fe43de2d28c432a159a044a2f272fae638a0a2 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