summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_input.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2017-05-03 19:58:12 +0000
committermillert <millert@openbsd.org>2017-05-03 19:58:12 +0000
commit3bfba4383497aa7d08240f7a43fd8c1231712617 (patch)
treea9ebc89218b22746ce56d1f0393d06d3018aad1d /sys/netinet/tcp_input.c
parentProvide a signed 64 bit integer timestamp in the mbuf packet header (diff)
downloadwireguard-openbsd-3bfba4383497aa7d08240f7a43fd8c1231712617.tar.xz
wireguard-openbsd-3bfba4383497aa7d08240f7a43fd8c1231712617.zip
Back out rev 1.185 (which made the code match the comment) and
adjust the comment to match reality (or at least rfc7323) instead. This brings us back in line with the behavior of Net and Free. From Lauri Tirkkonen. OK bluhm@
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r--sys/netinet/tcp_input.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index cc6c08609be..70887a58be0 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_input.c,v 1.341 2017/04/19 15:21:54 bluhm Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.342 2017/05/03 19:58:12 millert Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
@@ -1374,16 +1374,13 @@ trimthenstep6:
/*
* If last ACK falls within this segment's sequence numbers,
* record its timestamp if it's more recent.
- * Cf fix from Braden, see Stevens p. 870
+ * NOTE that the test is modified according to the latest
+ * proposal of the tcplw@cray.com list (Braden 1993/04/26).
*/
if (opti.ts_present && TSTMP_GEQ(opti.ts_val, tp->ts_recent) &&
SEQ_LEQ(th->th_seq, tp->last_ack_sent)) {
- if (SEQ_LEQ(tp->last_ack_sent, th->th_seq + tlen +
- ((tiflags & (TH_SYN|TH_FIN)) != 0)))
- tp->ts_recent = opti.ts_val;
- else
- tp->ts_recent = 0;
tp->ts_recent_age = tcp_now;
+ tp->ts_recent = opti.ts_val;
}
/*