]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/kern/uipc_mbuf.c
xnu-792.24.17.tar.gz
[apple/xnu.git] / bsd / kern / uipc_mbuf.c
index ec648d6757843b1282c70bb80b73d4b9108fe953..5d910167b4791fe17b6447938bd51543dbdc704a 100644 (file)
@@ -818,7 +818,11 @@ m_dup_pkthdr(struct mbuf *to, struct mbuf *from, int how)
         to->m_flags = (from->m_flags & M_COPYFLAGS) | (to->m_flags & M_EXT);
         if ((to->m_flags & M_EXT) == 0)
                 to->m_data = to->m_pktdat;
+       if (to->m_pkthdr.aux != NULL)
+               m_freem(to->m_pkthdr.aux);
         to->m_pkthdr = from->m_pkthdr;
+       to->m_pkthdr.aux = NULL;
+       (void) m_aux_copy(to, from);
         SLIST_INIT(&to->m_pkthdr.tags);
         return (m_tag_copy_chain(to, from, how));
 }