diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2014-09-22 23:20:00 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2014-09-22 23:20:00 +0000 |
commit | 036c179a06fa472a6b3e6a42ea33dafc63ee2554 (patch) | |
tree | 296fe0717ed3c88d9cf98e649b98eaedb778740f /sys/net/bpf.c | |
parent | 49ab0fad76ed113d8575c680b53d1be91f4f00fe (diff) |
it's easy to allow bpfwrites bigger than MCLBYTES now that we have
large cluster pools and MCLGETI.
we could chain mbufs if we want to go even bigger.
with a fix from Mathieu- <naabed at poolp dot org>
Diffstat (limited to 'sys/net/bpf.c')
-rw-r--r-- | sys/net/bpf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 3d4fdfe5dd4..0d9945a72d1 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.c,v 1.105 2014/09/22 23:16:30 dlg Exp $ */ +/* $OpenBSD: bpf.c,v 1.106 2014/09/22 23:19:59 dlg Exp $ */ /* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */ /* @@ -172,7 +172,7 @@ bpf_movein(struct uio *uio, u_int linktype, struct mbuf **mp, return (EIO); } - if (uio->uio_resid > MCLBYTES) + if (uio->uio_resid > MAXMCLBYTES) return (EIO); len = uio->uio_resid; @@ -181,7 +181,7 @@ bpf_movein(struct uio *uio, u_int linktype, struct mbuf **mp, m->m_pkthdr.len = len - hlen; if (len > MHLEN) { - MCLGET(m, M_WAIT); + MCLGETI(m, M_WAIT, NULL, len); if ((m->m_flags & M_EXT) == 0) { error = ENOBUFS; goto bad; |