From 8f40780108cfd8a164490298225073eb6796dcfc Mon Sep 17 00:00:00 2001 From: Daniel Hartmeier Date: Sat, 14 Jun 2003 07:23:16 +0000 Subject: Use source's window scaling factor (instead of destination's) when comparing ackskew, otherwise legitimate low acks can get blocked. Was triggered when asymmetric scale factors where used in combination with SACK. Report and logs provided by Peter Galbavy. ok frantzen@, henning@ --- sys/net/pf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/net') diff --git a/sys/net/pf.c b/sys/net/pf.c index 588410007e0..ac4eb59e79f 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.363 2003/06/10 22:05:03 dhartmei Exp $ */ +/* $OpenBSD: pf.c,v 1.364 2003/06/14 07:23:15 dhartmei Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -3309,7 +3309,7 @@ pf_test_state_tcp(struct pf_state **state, int direction, struct ifnet *ifp, /* Retrans: not more than one window back */ (ackskew >= -MAXACKWINDOW) && /* Acking not more than one reassembled fragment backwards */ - (ackskew <= (MAXACKWINDOW << dws))) { + (ackskew <= (MAXACKWINDOW << sws))) { /* Acking not more than one window forward */ (*state)->packets++; @@ -3458,7 +3458,7 @@ pf_test_state_tcp(struct pf_state **state, int direction, struct ifnet *ifp, SEQ_GEQ(seq, src->seqlo - (dst->max_win << dws)) ? ' ': '2', (ackskew >= -MAXACKWINDOW) ? ' ' : '3', - (ackskew <= MAXACKWINDOW) ? ' ' : '4', + (ackskew <= (MAXACKWINDOW << sws)) ? ' ' : '4', SEQ_GEQ(src->seqhi + MAXACKWINDOW, end) ?' ' :'5', SEQ_GEQ(seq, src->seqlo - MAXACKWINDOW) ?' ' :'6'); } -- cgit v1.2.3