From 807987bb242537fd19578f0638c5911467671a7b Mon Sep 17 00:00:00 2001 From: glebius Date: Tue, 6 Sep 2005 17:02:13 +0000 Subject: In INVARIANTS case also check that nodes do not pass queues of mbufs each other. --- sys/netgraph/ng_base.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/netgraph/ng_base.c') 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); \ -- cgit v1.1