summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2008-06-16 01:16:05 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2008-06-16 01:16:05 +0000
commit13ff0503146a45c2af51ea4bd082389f49d8d97a (patch)
tree959829d189f300e2b038cf44835077a52da54379 /sys/net
parent1ae4b579be1eb4d7f1bcc36205d3d186a9f788fa (diff)
when freeing a state key sk1, look wether it is linked to another state key
sk2 and reset sk2's link back to sk1
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/pf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index a0dfe19c913..cb48eb721ba 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.597 2008/06/12 18:41:41 henning Exp $ */
+/* $OpenBSD: pf.c,v 1.598 2008/06/16 01:16:04 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -726,6 +726,8 @@ pf_state_key_detach(struct pf_state_key *sk, struct pf_state *s, int flags)
if (TAILQ_EMPTY(&sk->states)) {
if (!(flags & PF_DT_SKIP_STATETREE))
RB_REMOVE(pf_state_tree, &pf_statetbl, sk);
+ if (sk->reverse)
+ sk->reverse->reverse = NULL;
pool_put(&pf_state_key_pl, sk);
}
}