aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authorAndre Oppermann <andre@FreeBSD.org>2012-10-28 17:30:28 +0000
committerAndre Oppermann <andre@FreeBSD.org>2012-10-28 17:30:28 +0000
commit4249614cb0e406e9e635b184b21b6fb3c4ec29a0 (patch)
tree2698263342eaa460adf32dedbaa1ae0896d8dce1 /sys/netinet/tcp_output.c
parentcf8f04f4c0328ef2386b561d705b6a0f6e3129f5 (diff)
downloadsrc-4249614cb0e406e9e635b184b21b6fb3c4ec29a0.tar.gz
src-4249614cb0e406e9e635b184b21b6fb3c4ec29a0.zip
When SYN or SYN/ACK had to be retransmitted RFC5681 requires us to
reduce the initial CWND to one segment. This reduction got lost some time ago due to a change in initialization ordering. Additionally in tcp_timer_rexmt() avoid entering fast recovery when we're still in TCPS_SYN_SENT state. MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=242251
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index e1d9f11a91b3..3a6ae9c181b1 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -551,10 +551,14 @@ 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.
+ *
+ * Don't send an independent window update if a delayed
+ * ACK is pending (it will get piggy-backed on it) or the
+ * remote side already has done a half-close and won't send
+ * more data.
*/
if (recwin > 0 && !(tp->t_flags & TF_NEEDSYN) &&
+ !(tp->t_flags & TF_DELACK) &&
!TCPS_HAVERCVDFIN(tp->t_state)) {
/*
* "adv" is the amount we can increase the window,