diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-07-03 16:45:25 +0200 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2023-07-19 05:03:11 +0200 |
commit | 427a02ad0a71a50c9be125d860a84d4e07d09f1e (patch) | |
tree | 84dd4e2febfc455f9e97f274429c7cf5c5ba7b3d | |
parent | QUIC TXP: Do not generate full-size packets when sending CC-excess probes (diff) | |
download | openssl-427a02ad0a71a50c9be125d860a84d4e07d09f1e.tar.xz openssl-427a02ad0a71a50c9be125d860a84d4e07d09f1e.zip |
QUIC ACKM: Don't record non-inflight packets in CC
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21349)
-rw-r--r-- | ssl/quic/quic_ackm.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/ssl/quic/quic_ackm.c b/ssl/quic/quic_ackm.c index facd34176a..3e05b5f833 100644 --- a/ssl/quic/quic_ackm.c +++ b/ssl/quic/quic_ackm.c @@ -951,18 +951,18 @@ static void ackm_on_pkts_lost(OSSL_ACKM *ackm, int pkt_space, if (p->pkt_num > largest_pn_lost) largest_pn_lost = p->pkt_num; - } - if (!pseudo) { - /* - * If this is pseudo-loss (e.g. during connection retry) we do not - * inform the CC as it is not a real loss and not reflective of - * network conditions. - */ - loss_info.tx_time = p->time; - loss_info.tx_size = p->num_bytes; + if (!pseudo) { + /* + * If this is pseudo-loss (e.g. during connection retry) we do not + * inform the CC as it is not a real loss and not reflective of + * network conditions. + */ + loss_info.tx_time = p->time; + loss_info.tx_size = p->num_bytes; - ackm->cc_method->on_data_lost(ackm->cc_data, &loss_info); + ackm->cc_method->on_data_lost(ackm->cc_data, &loss_info); + } } p->on_lost(p->cb_arg); @@ -1012,7 +1012,8 @@ static void ackm_on_pkts_acked(OSSL_ACKM *ackm, const OSSL_ACKM_TX_PKT *apkt) anext = apkt->anext; apkt->on_acked(apkt->cb_arg); /* may free apkt */ - ackm->cc_method->on_data_acked(ackm->cc_data, &ainfo); + if (apkt->is_inflight) + ackm->cc_method->on_data_acked(ackm->cc_data, &ainfo); } } |