Correct a bug introduced in 1.26: M_PKTHDR is set in the 'flags'
argument, not the 'type' argument. As a result of the buf, the MAC label on some packet header mbufs might not be set in mbufs allocated using m_getcl(), resulting in a page fault. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
This commit is contained in:
parent
a8ee7a0256
commit
55ac5e1861
@ -1463,7 +1463,7 @@ m_getcl(int how, short type, int flags)
|
||||
_mext_init_ref(mb, &cl_refcntmap[cl2ref(mb->m_ext.ext_buf)]);
|
||||
}
|
||||
#ifdef MAC
|
||||
if ((type & M_PKTHDR) && (mac_init_mbuf(mb, how) != 0)) {
|
||||
if ((flags & M_PKTHDR) && (mac_init_mbuf(mb, how) != 0)) {
|
||||
m_free(mb);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user