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:
Yoshinobu Inoue 2000-01-25 01:26:47 +00:00
parent e2de10abe4
commit 69a3468578
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=56565
2 changed files with 4 additions and 0 deletions

View File

@ -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;

View File

@ -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;