]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: quic: reset consecutive_losses on exit from recovery period (cubic)
authorFrederic Lecaille <flecaille@haproxy.com>
Thu, 28 May 2026 13:12:11 +0000 (15:12 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Thu, 28 May 2026 15:47:31 +0000 (17:47 +0200)
When exiting the recovery period and re-entering congestion avoidance,
the consecutive_losses counter was not reset. This meant that if a loss
event arrived immediately after the ACK that ended recovery, the counter
would still hold the value that triggered recovery, causing an immediate
re-entry into recovery (recovery -> CA -> recovery loop).

Resetting consecutive_losses to 0 on recovery exit matches the behavior
of resetting it on ACK in CA, ensuring a clean slate for the new
congestion avoidance period.

Must be backported to all versions.

src/quic_cc_cubic.c

index 98ba360b8ac147342185ea9f2359b105bcc203de..5981d0427d26d288af2986c591940e08821ef8c0 100644 (file)
@@ -607,6 +607,7 @@ static void quic_cc_cubic_rp_cb(struct quic_cc *cc, struct quic_cc_event *ev)
 
                c->state = QUIC_CC_ST_CA;
                c->recovery_start_time = TICK_ETERNITY;
+               c->consecutive_losses = 0;
                break;
        case QUIC_CC_EVT_LOSS:
                break;