Mercurial > hg > nginx
changeset 8512:6e1c88f82280 quic
QUIC: changed ctx->largest_ack initial value to type maximum.
In particular, this prevents declaring packet number 0 as lost if
there aren't yet any acknowledgements in this packet number space.
For example, only Initial packets were acknowledged in handshake.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 18 Aug 2020 23:33:40 +0300 |
parents | 830680e78b24 |
children | 38f1be6c603f |
files | src/event/ngx_event_quic.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/event/ngx_event_quic.c Tue Aug 18 17:11:32 2020 +0300 +++ b/src/event/ngx_event_quic.c Tue Aug 18 23:33:40 2020 +0300 @@ -690,6 +690,7 @@ ngx_queue_init(&qc->send_ctx[i].frames); ngx_queue_init(&qc->send_ctx[i].sent); qc->send_ctx[i].largest_pn = (uint64_t) -1; + qc->send_ctx[i].largest_ack = (uint64_t) -1; } for (i = 0; i < NGX_QUIC_ENCRYPTION_LAST; i++) { @@ -2346,7 +2347,7 @@ } /* 13.2.3. Receiver Tracking of ACK Frames */ - if (ctx->largest_ack < max) { + if (ctx->largest_ack < max || ctx->largest_ack == (uint64_t) -1) { ctx->largest_ack = max; ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, "quic updated largest received ack: %uL", max);