summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_syncache.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2012-10-28 17:25:08 +0000
committerandre <andre@FreeBSD.org>2012-10-28 17:25:08 +0000
commit79dbdb05fd2797ee1594cffb5dfae196f0580dd5 (patch)
tree1c72efa27b238febe6da8532f840afcd3d5ea1cd /sys/netinet/tcp_syncache.c
parent5589a42386ec4529bbf328ac2d0d56993c7b6d61 (diff)
downloadFreeBSD-src-79dbdb05fd2797ee1594cffb5dfae196f0580dd5.zip
FreeBSD-src-79dbdb05fd2797ee1594cffb5dfae196f0580dd5.tar.gz
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
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r--sys/netinet/tcp_syncache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index 55cca73..adb175b 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -852,11 +852,12 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m)
tcp_mss(tp, sc->sc_peer_mss);
/*
- * If the SYN,ACK was retransmitted, reset cwnd to 1 segment.
+ * If the SYN,ACK was retransmitted, indicate that CWND to be
+ * limited to one segment in cc_conn_init().
* NB: sc_rxmits counts all SYN,ACK transmits, not just retransmits.
*/
if (sc->sc_rxmits > 1)
- tp->snd_cwnd = tp->t_maxseg;
+ tp->snd_cwnd = 1;
#ifdef TCP_OFFLOAD
/*
OpenPOWER on IntegriCloud