summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-06-25 02:52:19 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-06-25 02:52:19 +0000
commit149fb9d1623745b48f1293d6138b09b3727ccaed (patch)
tree3d90e3caa394521a48a0aa6fcf5c44c79ea91297 /sys/kern
parent849e0e2969dbe4dd96b5a64abeda125a72e167a6 (diff)
Don't reset M_PKTHDR before we copy the mbuf flags (bad Federico!)
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/uipc_mbuf.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index b303fb8bafc..20fb437b057 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_mbuf.c,v 1.35 2001/06/25 01:50:16 fgsch Exp $ */
+/* $OpenBSD: uipc_mbuf.c,v 1.36 2001/06/25 02:52:18 angelos Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */
/*
@@ -289,11 +289,8 @@ m_prepend(m, len, how)
m_freem(m);
return (NULL);
}
- if (m->m_flags & M_PKTHDR) {
+ if (m->m_flags & M_PKTHDR)
M_COPY_PKTHDR(mn, m);
- m->m_flags &= ~M_PKTHDR;
- m_tag_init(m);
- }
mn->m_next = m;
m = mn;
if (len < MHLEN)
@@ -594,11 +591,8 @@ m_pullup(n, len)
if (m == NULL)
goto bad;
m->m_len = 0;
- if (n->m_flags & M_PKTHDR) {
+ if (n->m_flags & M_PKTHDR)
M_COPY_PKTHDR(m, n);
- n->m_flags &= ~M_PKTHDR;
- m_tag_init(n);
- }
}
space = &m->m_dat[MLEN] - (m->m_data + m->m_len);
do {
@@ -666,8 +660,8 @@ m_pullup2(n, len)
if (n->m_flags & M_PKTHDR) {
/* Too many adverse side effects. */
/* M_COPY_PKTHDR(m, n); */
- M_COPY_HDR(m, n);
m->m_flags = (n->m_flags & M_COPYFLAGS) | M_EXT;
+ M_COPY_HDR(m, n);
/* n->m_data is cool. */
}
}