diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2006-10-31 16:22:26 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2006-10-31 16:22:26 +0000 |
commit | 32a1a4de8dc340da1e1962d0ae33528c15104d7f (patch) | |
tree | 347e1308c54de720995d1dd10133dc3f25c9b7f8 /sys/netinet | |
parent | 8b1d7bc7924a9fe6f373d99299859ed17c557ddb (diff) |
do not re-generate the timestamp modulation offset for SYN-ACK retransmits;
this unbreaks TCP for high RTT (~3s); ok mcbride@
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/tcp_input.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 881d4ae1529..9a3c5f652d3 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.197 2006/10/11 09:34:51 henning Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.198 2006/10/31 16:22:25 markus Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -4067,8 +4067,10 @@ syn_cache_add(src, dst, th, iphlen, so, m, optp, optlen, oi) sc->sc_win = win; sc->sc_timestamp = tb.ts_recent; if ((tb.t_flags & (TF_REQ_TSTMP|TF_RCVD_TSTMP)) == - (TF_REQ_TSTMP|TF_RCVD_TSTMP)) + (TF_REQ_TSTMP|TF_RCVD_TSTMP)) { sc->sc_flags |= SCF_TIMESTAMP; + sc->sc_modulate = arc4random(); + } if ((tb.t_flags & (TF_RCVD_SCALE|TF_REQ_SCALE)) == (TF_RCVD_SCALE|TF_REQ_SCALE)) { sc->sc_requested_s_scale = tb.requested_s_scale; @@ -4250,7 +4252,6 @@ syn_cache_respond(sc, m) u_int32_t *lp = (u_int32_t *)(optp); /* Form timestamp option as shown in appendix A of RFC 1323. */ *lp++ = htonl(TCPOPT_TSTAMP_HDR); - sc->sc_modulate = arc4random(); *lp++ = htonl(SYN_CACHE_TIMESTAMP(sc)); *lp = htonl(sc->sc_timestamp); optp += TCPOLEN_TSTAMP_APPA; |