summaryrefslogtreecommitdiffstats
path: root/sys/net/if_tun.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-02-19 05:47:46 +0000
committerimp <imp@FreeBSD.org>2003-02-19 05:47:46 +0000
commitcf874b345d0f766fb64cf4737e1c85ccc78d2bee (patch)
tree9e20e320fe15ae4bf68f8335fcf9d3e71d3b3614 /sys/net/if_tun.c
parentb72619cecb8265d3efb3781b0acff1380762c173 (diff)
downloadFreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.zip
FreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.tar.gz
Back out M_* changes, per decision of the TRB.
Approved by: trb
Diffstat (limited to 'sys/net/if_tun.c')
-rw-r--r--sys/net/if_tun.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index e7c3a86..bcb9062 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -230,7 +230,7 @@ tuncreate(dev_t dev)
dev = make_dev(&tun_cdevsw, minor(dev),
UID_UUCP, GID_DIALER, 0600, "tun%d", dev2unit(dev));
- MALLOC(sc, struct tun_softc *, sizeof(*sc), M_TUN, M_ZERO);
+ MALLOC(sc, struct tun_softc *, sizeof(*sc), M_TUN, M_WAITOK | M_ZERO);
sc->tun_flags = TUN_INITED;
sc->next = tunhead;
tunhead = sc;
@@ -484,7 +484,7 @@ tunoutput(
/* prepend sockaddr? this may abort if the mbuf allocation fails */
if (tp->tun_flags & TUN_LMODE) {
/* allocate space for sockaddr */
- M_PREPEND(m0, dst->sa_len, M_NOWAIT);
+ M_PREPEND(m0, dst->sa_len, M_DONTWAIT);
/* if allocation failed drop packet */
if (m0 == NULL) {
@@ -498,7 +498,7 @@ tunoutput(
if (tp->tun_flags & TUN_IFHEAD) {
/* Prepend the address family */
- M_PREPEND(m0, 4, M_NOWAIT);
+ M_PREPEND(m0, 4, M_DONTWAIT);
/* if allocation failed drop packet */
if (m0 == NULL) {
@@ -718,7 +718,7 @@ tunwrite(dev_t dev, struct uio *uio, int flag)
tlen = uio->uio_resid;
/* get a header mbuf */
- MGETHDR(m, M_NOWAIT, MT_DATA);
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL)
return (ENOBUFS);
mlen = MHLEN;
@@ -731,7 +731,7 @@ tunwrite(dev_t dev, struct uio *uio, int flag)
*mp = m;
mp = &m->m_next;
if (uio->uio_resid > 0) {
- MGET (m, M_NOWAIT, MT_DATA);
+ MGET (m, M_DONTWAIT, MT_DATA);
if (m == 0) {
error = ENOBUFS;
break;
OpenPOWER on IntegriCloud