diff options
| author | Paul Saab <ps@FreeBSD.org> | 2005-07-05 19:23:02 +0000 |
|---|---|---|
| committer | Paul Saab <ps@FreeBSD.org> | 2005-07-05 19:23:02 +0000 |
| commit | d758711729635267058db8895f4a1260f1c17b40 (patch) | |
| tree | 0f9e6a381b179dcf749dfcbc7b0167e18748d319 /sys | |
| parent | d3cf5f1524584c0c606a1da65ab13c74a863b22f (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/netinet/tcp_input.c | 6 | ||||
| -rw-r--r-- | sys/netinet/tcp_reass.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index f5aa0128c702..c86a3eca3681 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; } /* diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index f5aa0128c702..c86a3eca3681 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.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; } /* |
