Add one further check with mac_policy_count to an mbuf copying case
(limited to netatalk) to avoid MAC label lookup on both mbufs if no policies are registered. Obtained from: TrustedBSD Project
This commit is contained in:
parent
437ea46b9f
commit
386cecbc67
@ -258,6 +258,9 @@ mac_mbuf_copy(struct mbuf *m_from, struct mbuf *m_to)
|
||||
{
|
||||
struct label *src_label, *dest_label;
|
||||
|
||||
if (mac_policy_count == 0)
|
||||
return;
|
||||
|
||||
src_label = mac_mbuf_to_label(m_from);
|
||||
dest_label = mac_mbuf_to_label(m_to);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user