summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2005-04-22 09:53:46 +0000
committerglebius <glebius@FreeBSD.org>2005-04-22 09:53:46 +0000
commit1268b440dc549568fa58865671762f02df1f70a4 (patch)
tree9c0beb8398f997932c89dcc20e03d3dd21198d22 /sys/contrib
parent9729412480c126bc3deef18dbaa29c01f0619307 (diff)
downloadFreeBSD-src-1268b440dc549568fa58865671762f02df1f70a4.zip
FreeBSD-src-1268b440dc549568fa58865671762f02df1f70a4.tar.gz
Fix error in synproxy connection completion. Source and
destination windows were confused, one instead of other. This error was masked, because first segment of just established connection is usually smaller than initially announced window, and it was successfully passed. First window reannouncement corrected erroneous 'seqhi' value. The error showed up when client connected to synproxy with zero initial window, and reannounced it after session establishment. In collaboration with: dhartmei [we came to same patch independtly] Reviewed by: mlaier Sponsored by: Rambler MFC after: 3 days
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/pf/net/pf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/contrib/pf/net/pf.c b/sys/contrib/pf/net/pf.c
index 3ad4247..4a65ea2 100644
--- a/sys/contrib/pf/net/pf.c
+++ b/sys/contrib/pf/net/pf.c
@@ -4065,9 +4065,9 @@ pf_test_state_tcp(struct pf_state **state, int direction, struct pfi_kif *kif,
(*state)->dst.seqdiff = (*state)->src.seqhi -
(*state)->dst.seqlo;
(*state)->src.seqhi = (*state)->src.seqlo +
- (*state)->src.max_win;
- (*state)->dst.seqhi = (*state)->dst.seqlo +
(*state)->dst.max_win;
+ (*state)->dst.seqhi = (*state)->dst.seqlo +
+ (*state)->src.max_win;
(*state)->src.wscale = (*state)->dst.wscale = 0;
(*state)->src.state = (*state)->dst.state =
TCPS_ESTABLISHED;
OpenPOWER on IntegriCloud