aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authorAndre Oppermann <andre@FreeBSD.org>2007-06-09 19:39:14 +0000
committerAndre Oppermann <andre@FreeBSD.org>2007-06-09 19:39:14 +0000
commitb7de7d87a0d9d74a4d511065677ae356b16c8e14 (patch)
tree6e5f8c844161d7851127721a3cce877e0488410c /sys/netinet/tcp_output.c
parenta140976eb44efd308803d4603b1cff9a759265ab (diff)
downloadsrc-b7de7d87a0d9d74a4d511065677ae356b16c8e14.tar.gz
src-b7de7d87a0d9d74a4d511065677ae356b16c8e14.zip
Don't send pure window updates when the peer has closed the connection
and won't ever send more data.
Notes
Notes: svn path=/head/; revision=170467
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index acd99d00c440..d8adff357b93 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -528,8 +528,11 @@ after_sack_rexmit:
* max size segments, or at least 50% of the maximum possible
* window, then want to send a window update to peer.
* Skip this if the connection is in T/TCP half-open state.
+ * Don't send pure window updates when the peer has closed
+ * the connection and won't ever send more data.
*/
- if (recwin > 0 && !(tp->t_flags & TF_NEEDSYN)) {
+ if (recwin > 0 && !(tp->t_flags & TF_NEEDSYN) &&
+ !TCPS_HAVERCVDFIN(tp->t_state)) {
/*
* "adv" is the amount we can increase the window,
* taking into account that we are limited by