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;
                                }
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to