diff options
author | glebius <glebius@FreeBSD.org> | 2015-02-23 18:57:09 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2015-02-23 18:57:09 +0000 |
commit | 45a2a34766ae485750a4e5a76cb0b0d57d32748e (patch) | |
tree | 8ea1aa75f4b6b8af40632772680e224f3124704a | |
parent | 4be1992eb5e5c620ed315c7020c3e7d46da2c04c (diff) | |
download | FreeBSD-src-45a2a34766ae485750a4e5a76cb0b0d57d32748e.zip FreeBSD-src-45a2a34766ae485750a4e5a76cb0b0d57d32748e.tar.gz |
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.
-rw-r--r-- | sys/sys/mbuf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index e071114..4b4a677 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -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); |