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.
This commit is contained in:
parent
20e8b32db4
commit
e40e8705db
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=288990
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user