Update m_demote:
- remove HT_HEADER test (MT_HEADER == MT_DATA for some time now) - be more pedantic about m_nextpkt in other than first mbuf - update m_flags to be retained
This commit is contained in:
parent
73f600f681
commit
469e8778b5
@ -320,11 +320,13 @@ m_demote(struct mbuf *m0, int all)
|
||||
m->m_flags &= ~M_PKTHDR;
|
||||
bzero(&m->m_pkthdr, sizeof(struct pkthdr));
|
||||
}
|
||||
if (m->m_type == MT_HEADER)
|
||||
m->m_type = MT_DATA;
|
||||
if (m != m0 && m->m_nextpkt != NULL)
|
||||
if (m != m0 && m->m_nextpkt != NULL) {
|
||||
KASSERT(m->m_nextpkt == NULL,
|
||||
("%s: m_nextpkt not NULL", __func__));
|
||||
m_freem(m->m_nextpkt);
|
||||
m->m_nextpkt = NULL;
|
||||
m->m_flags = m->m_flags & (M_EXT|M_EOR|M_RDONLY|M_FREELIST);
|
||||
}
|
||||
m->m_flags = m->m_flags & (M_EXT|M_RDONLY|M_FREELIST|M_NOFREE);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user