Author: avos
Date: Sun Nov  6 16:44:33 2016
New Revision: 308376
URL: https://svnweb.freebsd.org/changeset/base/308376

Log:
  MFC r288990:
  Fix regression from r248371. We need to copy packet header to new
  mbuf. Unlike in the pre-r248371 code, assert that M_PKTHDR is set
  only on a first mbuf.
  
  PR:           195074

Modified:
  stable/10/sys/kern/uipc_mbuf.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/uipc_mbuf.c
==============================================================================
--- stable/10/sys/kern/uipc_mbuf.c      Sun Nov  6 16:27:09 2016        
(r308375)
+++ stable/10/sys/kern/uipc_mbuf.c      Sun Nov  6 16:44:33 2016        
(r308376)
@@ -1994,6 +1994,11 @@ m_unshare(struct mbuf *m0, int how)
                        m_freem(m0);
                        return (NULL);
                }
+               if (m->m_flags & M_PKTHDR) {
+                       KASSERT(mprev == NULL, ("%s: m0 %p, m %p has M_PKTHDR",
+                           __func__, m0, m));
+                       m_move_pkthdr(n, m);
+               }
                len = m->m_len;
                off = 0;
                mfirst = n;
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to