diff options
author | ps <ps@FreeBSD.org> | 2005-07-05 19:23:02 +0000 |
---|---|---|
committer | ps <ps@FreeBSD.org> | 2005-07-05 19:23:02 +0000 |
commit | 17e64b657e59ca18136a7623d6a7186b2387123d (patch) | |
tree | 0f9e6a381b179dcf749dfcbc7b0167e18748d319 /sys/netinet/tcp_input.c | |
parent | 09a62d751039d62a78838eea38ca7dd6591622b0 (diff) | |
download | FreeBSD-src-17e64b657e59ca18136a7623d6a7186b2387123d.zip FreeBSD-src-17e64b657e59ca18136a7623d6a7186b2387123d.tar.gz |
Fix for a bug in newreno partial ack handling where if a large amount
of data is partial acked, snd_cwnd underflows, causing a burst.
Found, Submitted by: Noritoshi Demizu
Approved by: re
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r-- | sys/netinet/tcp_input.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index f5aa012..c86a3ec 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -3110,7 +3110,11 @@ tcp_newreno_partial_ack(tp, th) * Partial window deflation. Relies on fact that tp->snd_una * not updated yet. */ - tp->snd_cwnd -= (th->th_ack - tp->snd_una - tp->t_maxseg); + if (tp->snd_cwnd > th->th_ack - tp->snd_una) + tp->snd_cwnd -= th->th_ack - tp->snd_una; + else + tp->snd_cwnd = 0; + tp->snd_cwnd += tp->t_maxseg; } /* |