summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2005-03-12 08:07:10 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2005-03-12 08:07:10 +0000
commit89c01c2a43d4d00a128fe944eeaadc1244eb1796 (patch)
tree6b18c554abb8f78f7bd1b8fefc95f5ad86ea8dd9 /sys
parent52b799145a4f69f76ecf5a6826e61ad5f3440e13 (diff)
make sure code and comment match
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/tcp_input.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 24bf0082ca2..a55e411ed12 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_input.c,v 1.184 2005/03/09 11:14:37 markus Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.185 2005/03/12 08:07:09 markus Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
@@ -1377,13 +1377,17 @@ trimthenstep6:
/*
* If last ACK falls within this segment's sequence numbers,
- * record its timestamp.
- * Fix from Braden, see Stevens p. 870
+ * record its timestamp if it's more recent.
+ * Cf fix from Braden, see Stevens p. 870
*/
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;
}
/*