diff options
author | shin <shin@FreeBSD.org> | 2000-01-25 01:26:47 +0000 |
---|---|---|
committer | shin <shin@FreeBSD.org> | 2000-01-25 01:26:47 +0000 |
commit | 2dec7cab29ee1392b6b971760441849879293719 (patch) | |
tree | 94a97cd8846b278aca791cc81fb8ecdce176a132 /sys/netinet | |
parent | 3dd6ac32839b2903106dc8ef89e75c0ba9484701 (diff) | |
download | FreeBSD-src-2dec7cab29ee1392b6b971760441849879293719.zip FreeBSD-src-2dec7cab29ee1392b6b971760441849879293719.tar.gz |
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
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/tcp_input.c | 2 | ||||
-rw-r--r-- | sys/netinet/tcp_reass.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 73df9fd..2a847e6 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -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; diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 73df9fd..2a847e6 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -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; |