diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2012-11-27 17:29:08 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2012-11-27 17:29:08 +0000 |
commit | d51f5cddc8d73c07fbba14de4cd999b975ef3287 (patch) | |
tree | b30863040178d1a03f700c64010dd09d6f6df8db /sys/net/raw_usrreq.c | |
parent | 16816c0030e3a95109214b66851ebc0b91ee6e87 (diff) |
remove incorrect splnet usage in pfkey interface
and make raw_usrreq do an splsoftnet on its own;
joint work with david hill, ok claudio
Diffstat (limited to 'sys/net/raw_usrreq.c')
-rw-r--r-- | sys/net/raw_usrreq.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/net/raw_usrreq.c b/sys/net/raw_usrreq.c index a0cfa8b6769..0b65d2e7602 100644 --- a/sys/net/raw_usrreq.c +++ b/sys/net/raw_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raw_usrreq.c,v 1.14 2012/01/11 23:47:06 bluhm Exp $ */ +/* $OpenBSD: raw_usrreq.c,v 1.15 2012/11/27 17:29:07 mikeb Exp $ */ /* $NetBSD: raw_usrreq.c,v 1.11 1996/02/13 22:00:43 christos Exp $ */ /* @@ -151,7 +151,7 @@ raw_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, { struct rawcb *rp = sotorawcb(so); int error = 0; - int len; + int len, s; if (req == PRU_CONTROL) return (EOPNOTSUPP); @@ -163,6 +163,7 @@ raw_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, error = EINVAL; goto release; } + s = splsoftnet(); switch (req) { /* @@ -269,6 +270,7 @@ raw_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, /* * stat: don't bother with a blocksize. */ + splx(s); return (0); /* @@ -276,6 +278,7 @@ raw_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, */ case PRU_RCVOOB: case PRU_RCVD: + splx(s); return (EOPNOTSUPP); case PRU_LISTEN: @@ -308,6 +311,7 @@ raw_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, panic("raw_usrreq"); } release: + splx(s); if (m != NULL) m_freem(m); return (error); |