From 72b3135830824e441d2dd5c23c030e5dd9f07f5a Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Fri, 13 Mar 2020 08:45:44 +0100 Subject: [PATCH] Fix congestion window size after a triplicate ACK --- utcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utcp.c b/utcp.c index 3a6c506..d7bec9b 100644 --- a/utcp.c +++ b/utcp.c @@ -1454,7 +1454,7 @@ synack: // RFC 5681 fast recovery c->snd.ssthresh = max(c->snd.cwnd / 2, utcp->mtu * 2); // eq. 4 - c->snd.cwnd = max(c->snd.ssthresh + 3 * utcp->mtu, c->sndbuf.maxsize); + c->snd.cwnd = min(c->snd.ssthresh + 3 * utcp->mtu, c->sndbuf.maxsize); if(c->snd.cwnd > c->sndbuf.maxsize) { c->snd.cwnd = c->sndbuf.maxsize; -- 2.39.5