remove now invalid check from m_sanity

panic on m_sanity check failure with INVARIANTS
This commit is contained in:
Kip Macy 2007-04-14 20:19:16 +00:00
parent f8bbd17f06
commit 21ee3e7aff
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168734

View File

@ -330,8 +330,11 @@ m_sanity(struct mbuf *m0, int sanitize)
caddr_t a, b;
int pktlen = 0;
#define M_SANITY_ACTION(s) return (0)
/* #define M_SANITY_ACTION(s) panic("mbuf %p: " s, m) */
#ifdef INVARIANTS
#define M_SANITY_ACTION(s) panic("mbuf %p: " s, m)
#else
#define M_SANITY_ACTION(s) printf("mbuf %p: " s, m)
#endif
for (m = m0; m != NULL; m = m->m_next) {
/*
@ -365,14 +368,6 @@ m_sanity(struct mbuf *m0, int sanitize)
M_SANITY_ACTION("m->m_nextpkt on in-chain mbuf");
}
/* correct type correlations. */
if (m->m_type == MT_HEADER && !(m->m_flags & M_PKTHDR)) {
if (sanitize)
m->m_type = MT_DATA;
else
M_SANITY_ACTION("MT_HEADER set but not M_PKTHDR");
}
/* packet length (not mbuf length!) calculation */
if (m0->m_flags & M_PKTHDR)
pktlen += m->m_len;