summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_ipsp.h
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-03-27 14:45:23 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-03-27 14:45:23 +0000
commitfb1995477c407b9d415f5a26f8da6132c45c518e (patch)
tree0e9c52097f924ea06c9a2dafd1f6956b119da0d5 /sys/netinet/ip_ipsp.h
parent5e7c546f51ba932d1c019f64489c6664456e5784 (diff)
Fix a problem with how TDB timeouts were used in pfkeyv2.
When we allocated a tdb we did a timeout_add before a timeout_set. This was a problem in itself, but it shouldn't hurt too much. What did hurt was that we did a timeout_set after the timeout_add, timeout_set marked the timeout as not being on the timeout list and if we did a timeout_del (or timeout_add) later (before the timeout fired) we ended up with a chunk of freed memory on the timeout queue or maybe even dangling pointers (or a circular list). This should probably cure the timeout queue corruption some people were seeing lately.
Diffstat (limited to 'sys/netinet/ip_ipsp.h')
-rw-r--r--sys/netinet/ip_ipsp.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/ip_ipsp.h b/sys/netinet/ip_ipsp.h
index 7f834d72728..78f4298868f 100644
--- a/sys/netinet/ip_ipsp.h
+++ b/sys/netinet/ip_ipsp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipsp.h,v 1.80 2001/03/15 06:31:00 mickey Exp $ */
+/* $OpenBSD: ip_ipsp.h,v 1.81 2001/03/27 14:45:22 art Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -479,6 +479,7 @@ extern struct tdb *gettdbbysrc(union sockaddr_union *, u_int8_t,
struct mbuf *, int);
extern void puttdb(struct tdb *);
extern void tdb_delete(struct tdb *);
+extern struct tdb *tdb_alloc(void);
extern int tdb_init(struct tdb *, u_int16_t, struct ipsecinit *);
extern int tdb_walk(int (*)(struct tdb *, void *, int), void *);