mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
snd_una was being updated incorrectly, this resulted in the newreno
code retransmitting data from the wrong offset. As a footnote, the newreno code was partially derived from NetBSD and Tom Henderson <tomh@cs.berkeley.edu>
This commit is contained in:
parent
4d2d5ed69d
commit
6b2a5f92ba
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=60619
@ -2835,18 +2835,23 @@ tcp_newreno(tp, th)
|
|||||||
{
|
{
|
||||||
if (SEQ_LT(th->th_ack, tp->snd_recover)) {
|
if (SEQ_LT(th->th_ack, tp->snd_recover)) {
|
||||||
tcp_seq onxt = tp->snd_nxt;
|
tcp_seq onxt = tp->snd_nxt;
|
||||||
tcp_seq ouna = tp->snd_una; /* Haven't updated snd_una yet*/
|
|
||||||
u_long ocwnd = tp->snd_cwnd;
|
u_long ocwnd = tp->snd_cwnd;
|
||||||
|
|
||||||
callout_stop(tp->tt_rexmt);
|
callout_stop(tp->tt_rexmt);
|
||||||
tp->t_rtttime = 0;
|
tp->t_rtttime = 0;
|
||||||
tp->snd_nxt = th->th_ack;
|
tp->snd_nxt = th->th_ack;
|
||||||
tp->snd_cwnd = tp->t_maxseg;
|
tp->snd_cwnd = tp->t_maxseg;
|
||||||
tp->snd_una = th->th_ack;
|
/*
|
||||||
|
* Set snd_cwnd to one segment beyond acknowledged offset
|
||||||
|
* (tp->snd_una has not yet been updated when this function
|
||||||
|
* is called)
|
||||||
|
*/
|
||||||
|
tp->snd_cwnd = tp->t_maxseg + (th->th_ack - tp->snd_una);
|
||||||
|
(void) tcp_output(tp);
|
||||||
|
|
||||||
(void) tcp_output(tp);
|
(void) tcp_output(tp);
|
||||||
|
|
||||||
tp->snd_cwnd = ocwnd;
|
tp->snd_cwnd = ocwnd;
|
||||||
tp->snd_una = ouna;
|
|
||||||
if (SEQ_GT(onxt, tp->snd_nxt))
|
if (SEQ_GT(onxt, tp->snd_nxt))
|
||||||
tp->snd_nxt = onxt;
|
tp->snd_nxt = onxt;
|
||||||
/*
|
/*
|
||||||
|
@ -2835,18 +2835,23 @@ tcp_newreno(tp, th)
|
|||||||
{
|
{
|
||||||
if (SEQ_LT(th->th_ack, tp->snd_recover)) {
|
if (SEQ_LT(th->th_ack, tp->snd_recover)) {
|
||||||
tcp_seq onxt = tp->snd_nxt;
|
tcp_seq onxt = tp->snd_nxt;
|
||||||
tcp_seq ouna = tp->snd_una; /* Haven't updated snd_una yet*/
|
|
||||||
u_long ocwnd = tp->snd_cwnd;
|
u_long ocwnd = tp->snd_cwnd;
|
||||||
|
|
||||||
callout_stop(tp->tt_rexmt);
|
callout_stop(tp->tt_rexmt);
|
||||||
tp->t_rtttime = 0;
|
tp->t_rtttime = 0;
|
||||||
tp->snd_nxt = th->th_ack;
|
tp->snd_nxt = th->th_ack;
|
||||||
tp->snd_cwnd = tp->t_maxseg;
|
tp->snd_cwnd = tp->t_maxseg;
|
||||||
tp->snd_una = th->th_ack;
|
/*
|
||||||
|
* Set snd_cwnd to one segment beyond acknowledged offset
|
||||||
|
* (tp->snd_una has not yet been updated when this function
|
||||||
|
* is called)
|
||||||
|
*/
|
||||||
|
tp->snd_cwnd = tp->t_maxseg + (th->th_ack - tp->snd_una);
|
||||||
|
(void) tcp_output(tp);
|
||||||
|
|
||||||
(void) tcp_output(tp);
|
(void) tcp_output(tp);
|
||||||
|
|
||||||
tp->snd_cwnd = ocwnd;
|
tp->snd_cwnd = ocwnd;
|
||||||
tp->snd_una = ouna;
|
|
||||||
if (SEQ_GT(onxt, tp->snd_nxt))
|
if (SEQ_GT(onxt, tp->snd_nxt))
|
||||||
tp->snd_nxt = onxt;
|
tp->snd_nxt = onxt;
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user