summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2005-01-13 10:08:15 +0000
committerHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2005-01-13 10:08:15 +0000
commitdfb9de51258ad1f374844313a86f6042067b3b5b (patch)
tree05ca8bc6477e514b393c78de8c5b09e6e9d2734b
parent184022e4fbd9beb161d98b7e4e8cc6088c0b6321 (diff)
protect pfkeyv2_dump_walker with spltdb(). Noticed by mpech@, thanks!
ok ho@ markus@
-rw-r--r--sys/net/pfkeyv2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/net/pfkeyv2.c b/sys/net/pfkeyv2.c
index f6c7bde3f70..d705d1af22b 100644
--- a/sys/net/pfkeyv2.c
+++ b/sys/net/pfkeyv2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkeyv2.c,v 1.99 2004/12/11 16:02:21 markus Exp $ */
+/* $OpenBSD: pfkeyv2.c,v 1.100 2005/01/13 10:08:14 hshoexer Exp $ */
/*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
@@ -1366,7 +1366,11 @@ pfkeyv2_send(struct socket *socket, void *message, int len)
dump_state.sadb_msg = (struct sadb_msg *) headers[0];
dump_state.socket = socket;
- if (!(rval = tdb_walk(pfkeyv2_dump_walker, &dump_state)))
+ s = spltdb();
+ rval = tdb_walk(pfkeyv2_dump_walker, &dump_state);
+ splx(s);
+
+ if (!rval)
goto realret;
if ((rval == ENOMEM) || (rval == ENOBUFS))