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.
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++) {
}
/* 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);