svn commit: r305575 - head/sys/kern
Kevin Lo
kevlo at FreeBSD.org
Thu Sep 8 01:02:54 UTC 2016
Author: kevlo
Date: Thu Sep 8 01:02:53 2016
New Revision: 305575
URL: https://svnweb.freebsd.org/changeset/base/305575
Log:
In m_devget(), if the data fits in a packet header mbuf, check the amount
of data is less than or equal to MHLEN instead of MLEN when placing initial
small packet header at end of mbuf.
Reviewed by: glebius
MFC after: 3 days
Modified:
head/sys/kern/uipc_mbuf.c
Modified: head/sys/kern/uipc_mbuf.c
==============================================================================
--- head/sys/kern/uipc_mbuf.c Thu Sep 8 00:38:50 2016 (r305574)
+++ head/sys/kern/uipc_mbuf.c Thu Sep 8 01:02:53 2016 (r305575)
@@ -984,7 +984,7 @@ m_devget(char *buf, int totlen, int off,
len = MHLEN;
/* Place initial small packet/header at end of mbuf */
- if (m && totlen + off + max_linkhdr <= MLEN) {
+ if (m && totlen + off + max_linkhdr <= MHLEN) {
m->m_data += max_linkhdr;
len -= max_linkhdr;
}
More information about the svn-src-all
mailing list