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.
This commit is contained in:
glebius 2015-02-23 18:57:09 +00:00
parent 4be1992eb5
commit 45a2a34766

View File

@ -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);