From 0abff963fd619c037c4aa2c1b99d5cf9dd985bec Mon Sep 17 00:00:00 2001 From: Daniel Hartmeier Date: Tue, 21 Aug 2007 15:57:28 +0000 Subject: don't access th_flags when it isn't available (only 8 bytes of the header are required in the ICMP error). ok deraadt@, henning@ --- sys/net/pf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys/net/pf.c') diff --git a/sys/net/pf.c b/sys/net/pf.c index aa4326e7b67..f4b242a7474 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.551 2007/07/18 15:39:44 mpf Exp $ */ +/* $OpenBSD: pf.c,v 1.552 2007/08/21 15:57:27 dhartmei Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -4369,8 +4369,7 @@ pf_test_state_icmp(struct pf_state **state, int direction, struct pfi_kif *kif, dst = &(*state)->dst; } - if (src->wscale && dst->wscale && - !(th.th_flags & TH_SYN)) + if (src->wscale && dst->wscale) dws = dst->wscale & PF_WSCALE_MASK; else dws = 0; -- cgit v1.2.3