summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorcmetz <cmetz@cvs.openbsd.org>1999-05-14 02:05:43 +0000
committercmetz <cmetz@cvs.openbsd.org>1999-05-14 02:05:43 +0000
commitba83c4b8e6834269e7f509592f7ff7b4a2e638d7 (patch)
tree36238dde244dd4af3e2e39112e30788127a0fdca /sys/kern
parent7c1a49c2933435bb9dd53e0621658b2ff66a4301 (diff)
m_zero will no longer zero the contents of a cluster if there's an alias to it.
(TCP uses cluster mbuf aliases for retransmission, and this would cause your data to get retransmitted zeroed-out)
Diffstat (limited to 'sys/kern')
-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 f83ccb3ef41..8caae143a33 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_mbuf.c,v 1.10 1999/05/12 21:11:40 ho Exp $ */
+/* $OpenBSD: uipc_mbuf.c,v 1.11 1999/05/14 02:05:42 cmetz Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */
/*
@@ -860,7 +860,8 @@ m_zero(m)
sizeof(struct pkthdr), MHLEN);
else
bzero((void *)m + sizeof(struct m_hdr), MLEN);
- if (m->m_flags & M_EXT)
+ if ((m->m_flags & M_EXT) && !m->m_ext.ext_func &&
+ !mclrefcnt[mtocl((m)->m_ext.ext_buf)])
bzero(m->m_ext.ext_buf, m->m_ext.ext_size);
m = m->m_next;
}