summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/net/pf.c5
-rw-r--r--sys/net/pfvar.h3
2 files changed, 3 insertions, 5 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index b99b767f933..957320be3c3 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.567 2008/02/20 23:40:13 henning Exp $ */
+/* $OpenBSD: pf.c,v 1.568 2008/05/05 13:00:43 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -2836,7 +2836,6 @@ void
pf_attach_state(struct pf_state_key *sk, struct pf_state *s, int tail)
{
s->state_key = sk;
- sk->refcnt++;
/* list is sorted, if-bound states before floating */
if (tail)
@@ -2855,7 +2854,7 @@ pf_detach_state(struct pf_state *s, int flags)
s->state_key = NULL;
TAILQ_REMOVE(&sk->states, s, next);
- if (--sk->refcnt == 0) {
+ if (TAILQ_EMPTY(&sk->states)) {
if (!(flags & PF_DT_SKIP_EXTGWY))
RB_REMOVE(pf_state_tree_ext_gwy,
&pf_statetbl_ext_gwy, sk);
diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h
index 7f2bf5e88ab..d063b4fdf63 100644
--- a/sys/net/pfvar.h
+++ b/sys/net/pfvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfvar.h,v 1.259 2007/12/02 12:08:04 pascoe Exp $ */
+/* $OpenBSD: pfvar.h,v 1.260 2008/05/05 13:00:43 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -713,7 +713,6 @@ struct pf_state_key {
RB_ENTRY(pf_state_key) entry_lan_ext;
RB_ENTRY(pf_state_key) entry_ext_gwy;
struct pf_statelist states;
- u_short refcnt; /* same size as if_index */
};