Skip to content

Commit

Permalink
Even though the loss detection timer has fired we may not have lost p…
Browse files Browse the repository at this point in the history
…ackets

We calculate the delay from the point that a packet arrives until it will
be counted as lost based on rtt info. Looking at all the packets we can
then calculate the earliest time that a packet will be counted as lost.
When that timer fires the latest rtt info may have changed and therefore
the packet may no longer be counted as lost yet.

We should not assume that just because the ackm timeout has fired that
there will definitely be lost packets.

Fixes openssl#22538
  • Loading branch information
mattcaswell committed Oct 27, 2023
1 parent 0929814 commit f1455bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ssl/quic/quic_ackm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1301,8 +1301,8 @@ int ossl_ackm_on_timeout(OSSL_ACKM *ackm)
if (!ossl_time_is_zero(earliest_loss_time)) {
/* Time threshold loss detection. */
lost_pkts = ackm_detect_and_remove_lost_pkts(ackm, pkt_space);
assert(lost_pkts != NULL);
ackm_on_pkts_lost(ackm, pkt_space, lost_pkts, /*pseudo=*/0);
if (lost_pkts != NULL)
ackm_on_pkts_lost(ackm, pkt_space, lost_pkts, /*pseudo=*/0);
ackm_set_loss_detection_timer(ackm);
return 1;
}
Expand Down

0 comments on commit f1455bb

Please sign in to comment.