]> git.feebdaed.xyz Git - 0xmirror/nginx.git/commit
QUIC: prevent spurious congestion control recovery mode.
authorRoman Arutyunyan <arut@nginx.com>
Fri, 3 Jan 2025 09:01:06 +0000 (13:01 +0400)
committerRoman Arutyunyan <arutyunyan.roman@gmail.com>
Tue, 15 Apr 2025 15:01:36 +0000 (19:01 +0400)
commit38236bf74f3e5728eeea488bef381c61842ac1d2
tree8cf01926103f546607e658f426f1377bc2dd4e39
parent53e7e9eb542fb1d3d885bbca03ed1d704aa08f31
QUIC: prevent spurious congestion control recovery mode.

Since recovery_start field was initialized with ngx_current_msec, all
congestion events that happened within the same millisecond or cycle
iteration, were treated as in recovery mode.

Also, when handling persistent congestion, initializing recovery_start
with ngx_current_msec resulted in treating all sent packets as in recovery
mode, which violates RFC 9002, see example in Appendix B.8.

While here, also fixed recovery_start wrap protection.  Previously it used
2 * max_idle_timeout time frame for all sent frames, which is not a
reliable protection since max_idle_timeout is unrelated to congestion
control.  Now recovery_start <= now condition is enforced.  Note that
recovery_start wrap is highly unlikely and can only occur on a
32-bit system if there are no congestion events for 24 days.
src/event/quic/ngx_event_quic.c
src/event/quic/ngx_event_quic_ack.c
src/event/quic/ngx_event_quic_migration.c