]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: quic: 32 bits compilation issue (QUIC_MIN() usage)
authorFrederic Lecaille <flecaille@haproxy.com>
Wed, 3 Apr 2024 09:05:28 +0000 (11:05 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Wed, 3 Apr 2024 09:14:50 +0000 (11:14 +0200)
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.

src/quic_cc_cubic.c

index cc10a01c85ea37b5f8f196f8823e822e60892813..4bd1a7ce422df2f48613f891d468f8a6ffd406b4 100644 (file)
@@ -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;