nginx/src
Vladimir Homutov 45a8ca0e7a QUIC: fixed in-flight bytes accounting.
Initially, frames are genereated and stored in ctx->frames.
Next, ngx_quic_output() collects frames to be sent in in ctx->sending.
On failure, ngx_quic_revert_sned() returns frames into ctx->frames.

On success, the ngx_quic_commit_send() moves ack-eliciting frames into
ctx->sent and frees non-ack-eliciting frames.
This function also updates in-flight bytes counter, so only actually sent
frames are accounted.

The counter is decremented in the following cases:
 - acknowledgment is received
 - packet was declared lost
 - we are discarding context completely

In each of this cases frame is removed from ctx->sent queue and in-flight
counter is accordingly decremented.

The patch fixes the case of discarding context - only removing frames
from ctx->sent must be followed by in-flight bytes counter decrement,
otherwise cg->in_flight could experience type underflow.

The issue appeared in b1676cd64dc9.
2022-02-09 15:51:42 +03:00
..
core Merged with the default branch. 2022-01-25 23:42:48 +03:00
event QUIC: fixed in-flight bytes accounting. 2022-02-09 15:51:42 +03:00
http HTTP/3: proper uni stream closure detection. 2022-01-31 09:46:30 +03:00
mail Mail: connections with wrong ALPN protocols are now rejected. 2021-10-20 09:45:34 +03:00
misc Cpp test: added stream. 2020-10-13 07:44:09 +03:00
os QUIC: fixed macro style. 2022-01-25 15:48:05 +03:00
stream QUIC: fixed the "quic_stream_buffer_size" directive. 2022-02-08 23:00:12 +03:00