From a889699666bd4c3d31df6fe7f352b183b92a4c9f Mon Sep 17 00:00:00 2001 From: David Krause Date: Sat, 5 Jul 2008 16:57:51 +0000 Subject: in pf_state_key_attach(), when there is already an existing state key that can be used and we return the state key back to the pool, don't insert state items into the tailq using that garbage state key. this makes things much happier for me. ok henning@ --- sys/net/pf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net/pf.c b/sys/net/pf.c index aec095b1ab8..80bc147fc08 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.606 2008/07/04 00:56:48 henning Exp $ */ +/* $OpenBSD: pf.c,v 1.607 2008/07/05 16:57:50 david Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -696,9 +696,9 @@ pf_state_key_attach(struct pf_state_key *sk, struct pf_state *s, int idx) /* list is sorted, if-bound states before floating */ if (s->kif == pfi_all) - TAILQ_INSERT_TAIL(&sk->states, si, entry); + TAILQ_INSERT_TAIL(&s->key[idx]->states, si, entry); else - TAILQ_INSERT_HEAD(&sk->states, si, entry); + TAILQ_INSERT_HEAD(&s->key[idx]->states, si, entry); return (0); } -- cgit v1.2.3