-/* $OpenBSD: ip_ipsp.c,v 1.224 2017/05/18 10:56:45 bluhm Exp $ */
+/* $OpenBSD: ip_ipsp.c,v 1.225 2017/06/26 09:08:00 patrick Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr),
}
void
-tdb_delete(struct tdb *tdbp)
+tdb_unlink(struct tdb *tdbp)
{
struct tdb *tdbpp;
u_int32_t hashval;
}
tdbp->tdb_snext = NULL;
- tdb_free(tdbp);
tdb_count--;
}
+void
+tdb_delete(struct tdb *tdbp)
+{
+ NET_ASSERT_LOCKED();
+
+ tdb_unlink(tdbp);
+ tdb_free(tdbp);
+}
+
/*
* Allocate a TDB and initialize a few basic fields.
*/
-/* $OpenBSD: ip_ipsp.h,v 1.182 2017/05/22 22:23:11 bluhm Exp $ */
+/* $OpenBSD: ip_ipsp.h,v 1.183 2017/06/26 09:08:00 patrick Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr),
struct tdb *tdb_alloc(u_int);
void tdb_free(struct tdb *);
int tdb_init(struct tdb *, u_int16_t, struct ipsecinit *);
+void tdb_unlink(struct tdb *);
int tdb_walk(u_int, int (*)(struct tdb *, void *, int), void *);
/* XF_IP4 */