diff options
author | jayanth <jayanth@FreeBSD.org> | 2000-05-16 03:13:59 +0000 |
---|---|---|
committer | jayanth <jayanth@FreeBSD.org> | 2000-05-16 03:13:59 +0000 |
commit | ba14a43fa08d4340f2df0c9baa1b0a0a36d88925 (patch) | |
tree | c6d93fce25b6295f3486502c06c3d83454fcf5fb /sys/netinet/tcp_reass.c | |
parent | cabb5e540a5850940e930e5c499b10e4b95c6390 (diff) | |
download | FreeBSD-src-ba14a43fa08d4340f2df0c9baa1b0a0a36d88925.zip FreeBSD-src-ba14a43fa08d4340f2df0c9baa1b0a0a36d88925.tar.gz |
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>
Diffstat (limited to 'sys/netinet/tcp_reass.c')
-rw-r--r-- | sys/netinet/tcp_reass.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 82ab08f..a93b2cc 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -2835,18 +2835,23 @@ tcp_newreno(tp, th) { if (SEQ_LT(th->th_ack, tp->snd_recover)) { tcp_seq onxt = tp->snd_nxt; - tcp_seq ouna = tp->snd_una; /* Haven't updated snd_una yet*/ u_long ocwnd = tp->snd_cwnd; callout_stop(tp->tt_rexmt); tp->t_rtttime = 0; tp->snd_nxt = th->th_ack; 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); tp->snd_cwnd = ocwnd; - tp->snd_una = ouna; if (SEQ_GT(onxt, tp->snd_nxt)) tp->snd_nxt = onxt; /* |