diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2007-07-13 09:17:49 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2007-07-13 09:17:49 +0000 |
commit | bc6b16adae64e52188c3c65ea4d384c456833042 (patch) | |
tree | c1523cc8271a6f8bbcc5841504aefb9c9a5dcd07 /sys | |
parent | 633dcac3fddd6dee5d7a3594da24bf212b51a0ce (diff) |
remove obsolete pfi_statehead and pfik_w_states; ok henning@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/pf_if.c | 10 | ||||
-rw-r--r-- | sys/net/pfvar.h | 5 |
2 files changed, 4 insertions, 11 deletions
diff --git a/sys/net/pf_if.c b/sys/net/pf_if.c index 6a15a896317..8564f37be59 100644 --- a/sys/net/pf_if.c +++ b/sys/net/pf_if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_if.c,v 1.46 2006/12/13 09:01:59 itojun Exp $ */ +/* $OpenBSD: pf_if.c,v 1.47 2007/07/13 09:17:48 markus Exp $ */ /* * Copyright 2005 Henning Brauer <henning@openbsd.org> @@ -58,7 +58,6 @@ #endif /* INET6 */ struct pfi_kif *pfi_all = NULL; -struct pfi_statehead pfi_statehead; struct pool pfi_addr_pl; struct pfi_ifhead pfi_ifs; long pfi_update = 1; @@ -89,7 +88,6 @@ pfi_initialize(void) if (pfi_all != NULL) /* already initialized */ return; - TAILQ_INIT(&pfi_statehead); pool_init(&pfi_addr_pl, sizeof(struct pfi_dynaddr), 0, 0, 0, "pfiaddrpl", &pool_allocator_nointr); pfi_buffer_max = 64; @@ -132,8 +130,7 @@ pfi_kif_ref(struct pfi_kif *kif, enum pfi_kif_refs what) kif->pfik_rules++; break; case PFI_KIF_REF_STATE: - if (!kif->pfik_states++) - TAILQ_INSERT_TAIL(&pfi_statehead, kif, pfik_w_states); + kif->pfik_states++; break; default: panic("pfi_kif_ref with unknown type"); @@ -161,8 +158,7 @@ pfi_kif_unref(struct pfi_kif *kif, enum pfi_kif_refs what) printf("pfi_kif_unref: state refcount <= 0\n"); return; } - if (!--kif->pfik_states) - TAILQ_REMOVE(&pfi_statehead, kif, pfik_w_states); + kif->pfik_states--; break; default: panic("pfi_kif_unref with unknown type"); diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 5aa42b65b39..1cea3385e15 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar.h,v 1.253 2007/06/25 13:57:18 henning Exp $ */ +/* $OpenBSD: pfvar.h,v 1.254 2007/07/13 09:17:48 markus Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1011,7 +1011,6 @@ RB_HEAD(pf_state_tree_ext_gwy, pf_state_key); RB_PROTOTYPE(pf_state_tree_ext_gwy, pf_state_key, entry_ext_gwy, pf_state_compare_ext_gwy); -TAILQ_HEAD(pfi_statehead, pfi_kif); RB_HEAD(pfi_ifhead, pfi_kif); /* state tables */ @@ -1030,7 +1029,6 @@ struct pfi_kif { u_int64_t pfik_bytes[2][2][2]; u_int32_t pfik_tzero; int pfik_flags; - TAILQ_ENTRY(pfi_kif) pfik_w_states; void *pfik_ah_cookie; struct ifnet *pfik_ifp; struct ifg_group *pfik_group; @@ -1677,7 +1675,6 @@ int pfr_ina_commit(struct pfr_table *, u_int32_t, int *, int *, int); int pfr_ina_define(struct pfr_table *, struct pfr_addr *, int, int *, int *, u_int32_t, int); -extern struct pfi_statehead pfi_statehead; extern struct pfi_kif *pfi_all; void pfi_initialize(void); |