diff options
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r-- | sys/netinet/tcp_input.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 82ab08fbb957..a93b2cca5d7e 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.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; /* |