summaryrefslogtreecommitdiff
path: root/sys/netinet/in_pcb.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2013-03-31 11:18:36 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2013-03-31 11:18:36 +0000
commitab29ef8091ae52394d36c9d1bc9570b254e4b013 (patch)
tree5f7755fd654293e3837c8f807576852e196e01ce /sys/netinet/in_pcb.c
parent487397732b24561bad8713e0e858063719d6cedf (diff)
The call to in_pcballoc() in user request attach was handled in
three different ways. Use the same code in udp_usrreq() and rip_usrreq() and rip6_usrreq(). This also fixes a pcb and socket leak in udp_usrreq() in case soreserve() fails. Put an splsoftassert() into in_pcballoc() for safety. OK mpi@
Diffstat (limited to 'sys/netinet/in_pcb.c')
-rw-r--r--sys/netinet/in_pcb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index cf64629aaf5..3b67f7fcfd2 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_pcb.c,v 1.134 2013/03/29 13:16:14 bluhm Exp $ */
+/* $OpenBSD: in_pcb.c,v 1.135 2013/03/31 11:18:35 bluhm Exp $ */
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
/*
@@ -177,6 +177,8 @@ in_pcballoc(struct socket *so, struct inpcbtable *table)
struct inpcb *inp;
int s;
+ splsoftassert(IPL_SOFTNET);
+
if (inpcb_pool_initialized == 0) {
pool_init(&inpcb_pool, sizeof(struct inpcb), 0, 0, 0,
"inpcbpl", NULL);