diff options
Diffstat (limited to 'sys/netatalk')
-rw-r--r-- | sys/netatalk/ddp_output.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/netatalk/ddp_output.c b/sys/netatalk/ddp_output.c index 6d16cb0fae8..9958a113f0b 100644 --- a/sys/netatalk/ddp_output.c +++ b/sys/netatalk/ddp_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ddp_output.c,v 1.5 2002/03/15 18:19:52 millert Exp $ */ +/* $OpenBSD: ddp_output.c,v 1.6 2003/06/06 09:45:08 itojun Exp $ */ /* * Copyright (c) 1990,1991 Regents of The University of Michigan. @@ -109,7 +109,9 @@ ddp_output(struct mbuf *m, ...) ddp = va_arg(ap, struct ddpcb *); va_end(ap); - M_PREPEND( m, sizeof( struct ddpehdr ), M_WAIT ); + M_PREPEND( m, sizeof( struct ddpehdr ), M_DONTWAIT ); + if (!m) + return (ENOBUFS); deh = mtod( m, struct ddpehdr *); deh->deh_pad = 0; @@ -174,7 +176,6 @@ ddp_route( m, ro ) { struct sockaddr_at gate; struct elaphdr *elh; - struct mbuf *m0; struct at_ifaddr *aa = NULL; struct ifnet *ifp; u_int16_t net; @@ -205,10 +206,9 @@ ddp_route( m, ro ) return( ENOBUFS ); } } else { - MGET( m0, M_WAIT, MT_HEADER ); - m0->m_next = m; - m0->m_len = SZ_ELAPHDR; - m = m0; + M_PREPEND(m, SZ_ELAPHDR, M_DONTWAIT); + if (!m) + return (ENOBUFS); elh = mtod( m, struct elaphdr *); elh->el_snode = satosat( &aa->aa_addr )->sat_addr.s_node; |