summaryrefslogtreecommitdiff
path: root/sys/netinet/raw_ip.c
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-05-27 22:52:18 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2003-05-27 22:52:18 +0000
commita024d638ff76863626d3d8ea492aa9b5e3885684 (patch)
tree04968a5854f3dccd5332bb3c8c02fe1e943b6176 /sys/netinet/raw_ip.c
parentd3827fd51a2a81db3e3f075316f599167d1cea79 (diff)
don't use M_WAIT here. we could be in splnet, and caller may not be
xx_usrreq. henning ok
Diffstat (limited to 'sys/netinet/raw_ip.c')
-rw-r--r--sys/netinet/raw_ip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index a9f2a739763..2f16c287e38 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_ip.c,v 1.27 2003/02/15 16:43:10 markus Exp $ */
+/* $OpenBSD: raw_ip.c,v 1.28 2003/05/27 22:52:17 itojun Exp $ */
/* $NetBSD: raw_ip.c,v 1.25 1996/02/18 18:58:33 christos Exp $ */
/*
@@ -204,7 +204,9 @@ rip_output(struct mbuf *m, ...)
m_freem(m);
return (EMSGSIZE);
}
- M_PREPEND(m, sizeof(struct ip), M_WAIT);
+ M_PREPEND(m, sizeof(struct ip), M_DONTWAIT);
+ if (!m)
+ return (ENOBUFS);
ip = mtod(m, struct ip *);
ip->ip_tos = 0;
ip->ip_off = 0;