Avoid m_len and m_pkthdr.len inconsistency when changing m_len
for an mbuf whose M_PKTHDR is set. PR: related to kern/15175 Reviewed by: archie
This commit is contained in:
parent
e2de10abe4
commit
69a3468578
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=56565
@ -2396,6 +2396,8 @@ tcp_pulloutofband(so, th, m, off)
|
||||
tp->t_oobflags |= TCPOOB_HAVEDATA;
|
||||
bcopy(cp+1, cp, (unsigned)(m->m_len - cnt - 1));
|
||||
m->m_len--;
|
||||
if (m->m_flags & M_PKTHDR)
|
||||
m->m_pkthdr.len--;
|
||||
return;
|
||||
}
|
||||
cnt -= m->m_len;
|
||||
|
@ -2396,6 +2396,8 @@ tcp_pulloutofband(so, th, m, off)
|
||||
tp->t_oobflags |= TCPOOB_HAVEDATA;
|
||||
bcopy(cp+1, cp, (unsigned)(m->m_len - cnt - 1));
|
||||
m->m_len--;
|
||||
if (m->m_flags & M_PKTHDR)
|
||||
m->m_pkthdr.len--;
|
||||
return;
|
||||
}
|
||||
cnt -= m->m_len;
|
||||
|
Loading…
Reference in New Issue
Block a user