Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Feb 2015 18:57:10 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r279213 - head/sys/sys
Message-ID:  <201502231857.t1NIvAPN078908@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Mon Feb 23 18:57:09 2015
New Revision: 279213
URL: https://svnweb.freebsd.org/changeset/base/279213

Log:
  A lot of current code in network stack expects mbufs not having
  m_nextpkt pointer, assuming that if there is one, then this is
  a packet batch. Thus, mbufq_dequeue() needs to clear it on mbuf
  that is being returned.

Modified:
  head/sys/sys/mbuf.h

Modified: head/sys/sys/mbuf.h
==============================================================================
--- head/sys/sys/mbuf.h	Mon Feb 23 18:55:26 2015	(r279212)
+++ head/sys/sys/mbuf.h	Mon Feb 23 18:57:09 2015	(r279213)
@@ -1282,6 +1282,7 @@ mbufq_dequeue(struct mbufq *mq)
 	m = STAILQ_FIRST(&mq->mq_head);
 	if (m) {
 		STAILQ_REMOVE_HEAD(&mq->mq_head, m_stailqpkt);
+		m->m_nextpkt = NULL;
 		mq->mq_len--;
 	}
 	return (m);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502231857.t1NIvAPN078908>