X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/e3027f41d0120b4278cca462f397b6619dcd9ac5..0b4e3aa066abc0728aacb4bbeb86f53f9737156e:/bsd/kern/uipc_mbuf.c diff --git a/bsd/kern/uipc_mbuf.c b/bsd/kern/uipc_mbuf.c index a3ab82cc7..7f7250d3c 100644 --- a/bsd/kern/uipc_mbuf.c +++ b/bsd/kern/uipc_mbuf.c @@ -461,6 +461,8 @@ m_getpacket(void) m->m_data = m->m_ext.ext_buf; m->m_flags = M_PKTHDR | M_EXT; m->m_pkthdr.aux = (struct mbuf *)NULL; + m->m_pkthdr.csum_data = 0; + m->m_pkthdr.csum_flags = 0; m->m_ext.ext_size = MCLBYTES; m->m_ext.ext_refs.forward = m->m_ext.ext_refs.backward = &m->m_ext.ext_refs; @@ -955,11 +957,10 @@ m_split(m0, len0, wait) extpacket: if (m->m_flags & M_EXT) { n->m_flags |= M_EXT; - n->m_ext = m->m_ext; MBUF_LOCK(); - mclrefcnt[mtocl(m->m_ext.ext_buf)]++; + n->m_ext = m->m_ext; + insque((queue_t)&n->m_ext.ext_refs, (queue_t)&m->m_ext.ext_refs); MBUF_UNLOCK(); - m->m_ext.ext_size = 0; /* For Accounting XXXXXX danger */ n->m_data = m->m_data + len; } else { bcopy(mtod(m, caddr_t) + len, mtod(n, caddr_t), remain);