From 6464079f103e7c50dd90d328663098eb1bbecee0 Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Mon, 1 Sep 2003 05:35:55 +0000 Subject: Locking and misc cleanups; most of which I've been running for >4 months: o add locking o strip irrelevant spl's o split malloc types to better account for memory use o remove unused IPSEC_NONBLOCK_ACQUIRE code o remove dead code Sponsored by: FreeBSD Foundation --- sys/netipsec/ipsec.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/netipsec/ipsec.h') diff --git a/sys/netipsec/ipsec.h b/sys/netipsec/ipsec.h index 7f0a021b23f3..0c518ff4ea97 100644 --- a/sys/netipsec/ipsec.h +++ b/sys/netipsec/ipsec.h @@ -71,6 +71,7 @@ struct secpolicyindex { /* Security Policy Data Base */ struct secpolicy { LIST_ENTRY(secpolicy) chain; + struct mtx lock; u_int refcnt; /* reference count */ struct secpolicyindex spidx; /* selector */ @@ -108,6 +109,7 @@ struct ipsecrequest { struct secasvar *sav; /* place holder of SA for use */ struct secpolicy *sp; /* back pointer to SP */ + struct mtx lock; /* to interlock updates */ }; /* security policy in PCB */ @@ -322,6 +324,9 @@ extern int crypto_support; /* for openbsd compatibility */ #define DPRINTF(x) do { if (ipsec_debug) printf x; } while (0) +extern struct ipsecrequest *ipsec_newisr(void); +extern void ipsec_delisr(struct ipsecrequest *); + struct tdb_ident; extern struct secpolicy *ipsec_getpolicy __P((struct tdb_ident*, u_int)); struct inpcb; -- cgit v1.3