diff options
Diffstat (limited to 'sys/net/ppp_tty.c')
-rw-r--r-- | sys/net/ppp_tty.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c index 14c820497c8..12ada39de73 100644 --- a/sys/net/ppp_tty.c +++ b/sys/net/ppp_tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ppp_tty.c,v 1.15 2002/07/01 19:31:35 deraadt Exp $ */ +/* $OpenBSD: ppp_tty.c,v 1.16 2003/03/09 12:03:22 kjc Exp $ */ /* $NetBSD: ppp_tty.c,v 1.12 1997/03/24 21:23:10 christos Exp $ */ /* @@ -367,7 +367,12 @@ pppwrite(tp, uio, flag) uio->uio_resid < PPP_HDRLEN) return (EMSGSIZE); for (mp = &m0; uio->uio_resid; mp = &m->m_next) { - MGET(m, M_WAIT, MT_DATA); + if (mp == &m0) { + MGETHDR(m, M_WAIT, MT_DATA); + m->m_pkthdr.len = uio->uio_resid - PPP_HDRLEN; + m->m_pkthdr.rcvif = NULL; + } else + MGET(m, M_WAIT, MT_DATA); *mp = m; m->m_len = 0; if (uio->uio_resid >= MCLBYTES / 2) |