From 1268b440dc549568fa58865671762f02df1f70a4 Mon Sep 17 00:00:00 2001 From: glebius Date: Fri, 22 Apr 2005 09:53:46 +0000 Subject: 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 --- sys/contrib/pf/net/pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/contrib') 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; -- cgit v1.1