* SUCH DAMAGE.
*/
-#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(__NetBSD__)
-#include "opt_inet.h"
-#ifdef __NetBSD__
-#include "opt_ipsec.h"
-#endif
-#endif
-
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/param.h>
#include <net/net_osdep.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
MALLOC_DEFINE(M_SECA, "key mgmt", "security associations, key management");
-#endif
-static void keydb_delsecasvar __P((struct secasvar *));
+static void keydb_delsecasvar(struct secasvar *);
/*
* secpolicy management
{
int s;
-#ifdef __NetBSD__
- s = splsoftnet();
-#else
s = splnet();
-#endif
p->refcnt++;
splx(s);
}
{
int s;
-#ifdef __NetBSD__
- s = splsoftnet();
-#else
s = splnet();
-#endif
p->refcnt--;
- if (p->refcnt == 0)
+ /* negative refcnt will cause panic intentionally */
+ if (p->refcnt <= 0)
keydb_delsecasvar(p);
splx(s);
}