summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorDaniel Hartmeier <dhartmei@cvs.openbsd.org>2003-12-18 20:13:24 +0000
committerDaniel Hartmeier <dhartmei@cvs.openbsd.org>2003-12-18 20:13:24 +0000
commita672640a18ef23e6b8958fd490a49e07c1222ba7 (patch)
tree466ded46df8c821b71aefd39759774b320909f8c /sys/net
parenta02952ebdaba37a9997ba922bee62c3004170ba4 (diff)
TCP timestamp modulation (scrub reassemble tcp) fix from frantzen@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/pf_norm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/net/pf_norm.c b/sys/net/pf_norm.c
index 02b81985f2e..13c7f50eaf2 100644
--- a/sys/net/pf_norm.c
+++ b/sys/net/pf_norm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_norm.c,v 1.75 2003/08/29 01:49:08 dhartmei Exp $ */
+/* $OpenBSD: pf_norm.c,v 1.76 2003/12/18 20:13:23 dhartmei Exp $ */
/*
* Copyright 2001 Niels Provos <provos@citi.umich.edu>
@@ -1450,11 +1450,13 @@ pf_normalize_tcp_stateful(struct mbuf *m, int off, struct pf_pdesc *pd,
&th->th_sum, ts_value, 0);
copyback = 1;
}
- if (dst->scrub &&
+
+ /* Modulate TS reply iff valid (!0) */
+ memcpy(&ts_value, &opt[6],
+ sizeof(u_int32_t));
+ if (ts_value && dst->scrub &&
(dst->scrub->pfss_flags &
PFSS_TIMESTAMP)) {
- memcpy(&ts_value, &opt[6],
- sizeof(u_int32_t));
ts_value = htonl(ntohl(ts_value)
- dst->scrub->pfss_ts_mod);
pf_change_a(&opt[6],