From: Frédéric Lécaille Date: Thu, 3 Mar 2022 06:16:45 +0000 (+0100) Subject: BUG/MINOR: quic: Confusion betwen "in_flight" and "prep_in_flight" in quic_path_prep_... X-Git-Tag: v2.6-dev3~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=abdf4a15331af03a3d1a132de3171823c8ee5e8a;p=thirdparty%2Fhaproxy.git BUG/MINOR: quic: Confusion betwen "in_flight" and "prep_in_flight" in quic_path_prep_data() This function returns the remaining number of bytes which can be sent on the network before fulfilling the congestion window. There is a counter for the number of prepared data and another one for the really in flight number of bytes (in_flight). These variable have been mixed up. --- diff --git a/include/haproxy/xprt_quic.h b/include/haproxy/xprt_quic.h index 51b05578d1..5e66b54808 100644 --- a/include/haproxy/xprt_quic.h +++ b/include/haproxy/xprt_quic.h @@ -1034,7 +1034,7 @@ static inline size_t quic_path_room(struct quic_path *path) */ static inline size_t quic_path_prep_data(struct quic_path *path) { - if (path->in_flight > path->cwnd) + if (path->prep_in_flight > path->cwnd) return 0; return path->cwnd - path->prep_in_flight;