svn commit: r288990 - head/sys/kern
Gleb Smirnoff
glebius at FreeBSD.org
Wed Oct 7 12:40:02 UTC 2015
Author: glebius
Date: Wed Oct 7 12:40:00 2015
New Revision: 288990
URL: https://svnweb.freebsd.org/changeset/base/288990
Log:
Fix regression from r248371. We need to copy packet header to new
mbuf. Unlike in the pre-r248371 code, assert that M_PKTHDR is set
only on a first mbuf.
Reported & tested by: Andriy Voskoboinyk <s3erios gmail.com>
Sponsored by: Nginx, Inc.
Modified:
head/sys/kern/uipc_mbuf.c
Modified: head/sys/kern/uipc_mbuf.c
==============================================================================
--- head/sys/kern/uipc_mbuf.c Wed Oct 7 12:36:28 2015 (r288989)
+++ head/sys/kern/uipc_mbuf.c Wed Oct 7 12:40:00 2015 (r288990)
@@ -1867,6 +1867,11 @@ m_unshare(struct mbuf *m0, int how)
m_freem(m0);
return (NULL);
}
+ if (m->m_flags & M_PKTHDR) {
+ KASSERT(mprev == NULL, ("%s: m0 %p, m %p has M_PKTHDR",
+ __func__, m0, m));
+ m_move_pkthdr(n, m);
+ }
len = m->m_len;
off = 0;
mfirst = n;
More information about the svn-src-head
mailing list