From: Hugo Landau Date: Mon, 3 Jul 2023 14:45:25 +0000 (+0100) Subject: QUIC ACKM: Don't record non-inflight packets in CC X-Git-Tag: openssl-3.2.0-alpha1~392 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=427a02ad0a71a50c9be125d860a84d4e07d09f1e;p=thirdparty%2Fopenssl.git QUIC ACKM: Don't record non-inflight packets in CC Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/21349) --- diff --git a/ssl/quic/quic_ackm.c b/ssl/quic/quic_ackm.c index facd34176a0..3e05b5f8335 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); } }