-/* $OpenBSD: pf.c,v 1.1150 2022/11/11 11:47:12 dlg Exp $ */
+/* $OpenBSD: pf.c,v 1.1151 2022/11/11 15:02:31 dlg Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
st->sync_state = PFSYNC_S_NONE;
refcnt_init(&st->refcnt);
+ mtx_init(&st->mtx, IPL_NET);
/* XXX when we have anchors, use STATE_INC_COUNTERS */
r->states_cur++;
* pf_state_inserts() grabs reference for pfsync!
*/
refcnt_init(&s->refcnt);
+ mtx_init(&s->mtx, IPL_NET);
switch (pd->proto) {
case IPPROTO_TCP:
-/* $OpenBSD: pfvar_priv.h,v 1.18 2022/11/11 12:50:45 dlg Exp $ */
+/* $OpenBSD: pfvar_priv.h,v 1.19 2022/11/11 15:02:31 dlg Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
/*
* Protection/ownership of pf_state members:
* I immutable after creation
+ * M pf_state mtx
* P PF_STATE_LOCK
* S pfsync mutex
* L pf_state_list
struct pf_sn_head src_nodes; /* [I] */
struct pf_state_key *key[2]; /* [ddresses stack and wire */
struct pfi_kif *kif; /* [I] */
+ struct mutex mtx;
+ pf_refcnt_t refcnt;
u_int64_t packets[2];
u_int64_t bytes[2];
int32_t creation; /* [I] */
u_int16_t max_mss; /* [I] */
u_int16_t if_index_in; /* [I] */
u_int16_t if_index_out; /* [I] */
- pf_refcnt_t refcnt;
u_int16_t delay; /* [I] */
u_int8_t rt; /* [I] */
u_int8_t snapped; /* [S] */