writing out of bpf; use a hdr mbuf and set the pkthdr.len as well.
(rarpd now works with if_ep.c!)
This commit is contained in:
parent
231463b415
commit
d553c09639
@ -36,7 +36,7 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* from: @(#)bpf.c 7.5 (Berkeley) 7/15/91
|
* from: @(#)bpf.c 7.5 (Berkeley) 7/15/91
|
||||||
* $Id: bpf.c,v 1.8 1993/12/18 00:40:49 mycroft Exp $
|
* $Id: bpf.c,v 1.9 1994/01/12 00:38:50 deraadt Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "bpfilter.h"
|
#include "bpfilter.h"
|
||||||
@ -165,7 +165,7 @@ bpf_movein(uio, linktype, mp, sockp)
|
|||||||
if ((unsigned)len > MCLBYTES)
|
if ((unsigned)len > MCLBYTES)
|
||||||
return (EIO);
|
return (EIO);
|
||||||
|
|
||||||
MGET(m, M_WAIT, MT_DATA);
|
MGETHDR(m, M_WAIT, MT_DATA);
|
||||||
if (m == 0)
|
if (m == 0)
|
||||||
return (ENOBUFS);
|
return (ENOBUFS);
|
||||||
if (len > MLEN) {
|
if (len > MLEN) {
|
||||||
@ -181,6 +181,7 @@ bpf_movein(uio, linktype, mp, sockp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
m->m_len = len;
|
m->m_len = len;
|
||||||
|
m->m_pkthdr.len = len + hlen;
|
||||||
*mp = m;
|
*mp = m;
|
||||||
/*
|
/*
|
||||||
* Make room for link header.
|
* Make room for link header.
|
||||||
|
Loading…
Reference in New Issue
Block a user