From: Frederic Lecaille Date: Wed, 3 Apr 2024 09:05:28 +0000 (+0200) Subject: BUILD: quic: 32 bits compilation issue (QUIC_MIN() usage) X-Git-Tag: v3.0-dev7~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0e14bac7bdd5c3bae4402c8185a9a9bb49ebe8db;p=thirdparty%2Fhaproxy.git BUILD: quic: 32 bits compilation issue (QUIC_MIN() usage) This issue arrived with this commit: "MINOR: quic: HyStart++ implementation (RFC 9406)" Thanks to @chipitsine for having reported this issue in GH #2513. Should be backported where the previous commit will be backported. --- diff --git a/src/quic_cc_cubic.c b/src/quic_cc_cubic.c index cc10a01c85..4bd1a7ce42 100644 --- a/src/quic_cc_cubic.c +++ b/src/quic_cc_cubic.c @@ -432,7 +432,7 @@ static void quic_cc_cubic_ss_cb(struct quic_cc *cc, struct quic_cc_event *ev) case QUIC_CC_EVT_ACK: if (global.tune.options & GTUNE_QUIC_CC_HYSTART) { struct quic_hystart *h = &c->hystart; - unsigned int acked = QUIC_MIN(ev->ack.acked, HYSTART_LIMIT * path->mtu); + unsigned int acked = QUIC_MIN(ev->ack.acked, (uint64_t)HYSTART_LIMIT * path->mtu); if (path->cwnd >= QUIC_CC_INFINITE_SSTHESH - acked) goto out; @@ -508,7 +508,7 @@ static void quic_cc_cubic_cs_cb(struct quic_cc *cc, struct quic_cc_event *ev) struct cubic *c = quic_cc_priv(cc); struct quic_hystart *h = &c->hystart; unsigned int acked = - QUIC_MIN(ev->ack.acked, HYSTART_LIMIT * path->mtu) / HYSTART_CSS_GROWTH_DIVISOR; + QUIC_MIN(ev->ack.acked, (uint64_t)HYSTART_LIMIT * path->mtu) / HYSTART_CSS_GROWTH_DIVISOR; if (path->cwnd >= QUIC_CC_INFINITE_SSTHESH - acked) goto out;