Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Sep 2016 01:02:53 +0000 (UTC)
From:      Kevin Lo <kevlo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r305575 - head/sys/kern
Message-ID:  <201609080102.u8812rWA067131@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 				}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609080102.u8812rWA067131>