summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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