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
This commit is contained in:
Paul Saab 2005-07-05 19:23:02 +00:00
parent d3cf5f1524
commit d758711729
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=147781
2 changed files with 10 additions and 2 deletions

View File

@ -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;
}
/*

View File

@ -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;
}
/*