diff options
author | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2004-09-29 10:32:34 +0000 |
---|---|---|
committer | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2004-09-29 10:32:34 +0000 |
commit | 2d00f17d8f339f5c5858d1176070baa540ae12a0 (patch) | |
tree | 072f7bbeff748733760809824af321bc404f7e00 /sys/net/pf.c | |
parent | 49c5f0d514fb01a577e2531f882c1b8edd345b33 (diff) |
reset anchor pointer to NULL when stepping back into the main ruleset,
fixes pflog attributing states wrongly to anchors and pfctl -vvsn/sr
showing wrong state counters for anchor rules. found by camield@,
ok henning@, -stable candidate
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r-- | sys/net/pf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index 6d09c6b9598..6d278dc5e4c 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.459 2004/09/20 19:56:01 henning Exp $ */ +/* $OpenBSD: pf.c,v 1.460 2004/09/29 10:32:33 dhartmei Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1693,6 +1693,8 @@ pf_step_out_of_anchor(int *depth, struct pf_ruleset **rs, int n, } } (*depth)--; + if (*depth == 0 && a != NULL) + *a = NULL; *rs = f->rs; *r = TAILQ_NEXT(f->r, entries); } while (*r == NULL); |