summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-03-30 19:24:36 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-03-30 19:24:36 +0000
commit7dcee69d92f04330a55189855ab3f4ab0a47d9bc (patch)
tree8b49955cd42d1004e1fcaa7f4e2904ce31535f75
parent73e14b515f3b16e85895cdce2a9f18866956e1df (diff)
Be consistent when adjusting pkthdr.len; it doesn't matter currently,
since the callers always do the right thing, but it might in the future. Pointed out by art@
-rw-r--r--sys/kern/uipc_mbuf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index ae876576c49..d7ce9688e1e 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_mbuf.c,v 1.24 2001/03/28 20:03:00 angelos Exp $ */
+/* $OpenBSD: uipc_mbuf.c,v 1.25 2001/03/30 19:24:35 angelos Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */
/*
@@ -806,7 +806,8 @@ m_inject(m0, len0, siz, wait)
}
n->m_len = siz;
- m0->m_pkthdr.len += siz;
+ if (m0->m_flags & M_PKTHDR)
+ m0->m_pkthdr.len += siz;
m->m_len -= remain; /* Trim */
if (n2) {
for (n3 = n; n3->m_next != NULL; n3 = n3->m_next)