summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_base.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2005-09-06 17:02:13 +0000
committerglebius <glebius@FreeBSD.org>2005-09-06 17:02:13 +0000
commit807987bb242537fd19578f0638c5911467671a7b (patch)
treedf5502dc24259b1fa07c6add63fab432c06f67ea /sys/netgraph/ng_base.c
parentc91795766ca8cf09f1c3083e8fdb9a3c10022234 (diff)
downloadFreeBSD-src-807987bb242537fd19578f0638c5911467671a7b.zip
FreeBSD-src-807987bb242537fd19578f0638c5911467671a7b.tar.gz
In INVARIANTS case also check that nodes do not pass queues of mbufs
each other.
Diffstat (limited to 'sys/netgraph/ng_base.c')
-rw-r--r--sys/netgraph/ng_base.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c
index ec1b6a5..200552b 100644
--- a/sys/netgraph/ng_base.c
+++ b/sys/netgraph/ng_base.c
@@ -330,8 +330,12 @@ static ng_ID_t nextID = 1;
int total; \
\
M_ASSERTPKTHDR(m); \
- for (total = 0, n = (m); n != NULL; n = n->m_next) \
+ for (total = 0, n = (m); n != NULL; n = n->m_next) { \
total += n->m_len; \
+ if (n->m_nextpkt != NULL) \
+ panic("%s: m_nextpkt", __func__); \
+ } \
+
if ((m)->m_pkthdr.len != total) { \
panic("%s: %d != %d", \
__func__, (m)->m_pkthdr.len, total); \
OpenPOWER on IntegriCloud