mirror of
https://github.com/opnsense/src.git
synced 2026-06-14 19:20:18 -04:00
remove now invalid check from m_sanity
panic on m_sanity check failure with INVARIANTS
This commit is contained in:
parent
f8bbd17f06
commit
21ee3e7aff
1 changed files with 5 additions and 10 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue