]> git.kaiwu.me - nginx.git/commitdiff
QUIC: fixed client request timeout in 0-RTT scenarios.
authornandsky <lishu.zy@alibaba-inc.com>
Mon, 25 Nov 2024 07:26:29 +0000 (15:26 +0800)
committerRoman Arutyunyan <arutyunyan.roman@gmail.com>
Tue, 10 Dec 2024 13:17:20 +0000 (17:17 +0400)
Since 0-RTT and 1-RTT data exist in the same packet number space,
ngx_quic_discard_ctx incorrectly discards 1-RTT packets when
0-RTT keys are discarded.

The issue was introduced by 58b92177e7c3c50f77f807ab3846ad5c7bbf0ebe.

src/event/quic/ngx_event_quic.c

index c03b1d003adc59c91f850c5312992a2e9f6d1a51..308597e27ba8f23aefd0b6e22296d213f584658c 100644 (file)
@@ -1029,7 +1029,7 @@ ngx_quic_handle_payload(ngx_connection_t *c, ngx_quic_header_t *pkt)
          * After receiving a 1-RTT packet, servers MUST discard
          * 0-RTT keys within a short time
          */
-        ngx_quic_discard_ctx(c, ssl_encryption_early_data);
+        ngx_quic_keys_discard(qc->keys, ssl_encryption_early_data);
     }
 
     if (qc->closing) {