MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mac_mbuf_init

Function mac_mbuf_init

freebsd/security/mac/mac_net.c:171–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171int
172mac_mbuf_init(struct mbuf *m, int flag)
173{
174 struct m_tag *tag;
175 int error;
176
177 M_ASSERTPKTHDR(m);
178
179 if (mac_labeled & MPC_OBJECT_MBUF) {
180 tag = m_tag_get(PACKET_TAG_MACLABEL, sizeof(struct label),
181 flag);
182 if (tag == NULL)
183 return (ENOMEM);
184 error = mac_mbuf_tag_init(tag, flag);
185 if (error) {
186 m_tag_free(tag);
187 return (error);
188 }
189 m_tag_prepend(m, tag);
190 }
191 return (0);
192}
193
194static void
195mac_bpfdesc_label_free(struct label *label)

Callers 1

m_pkthdr_initFunction · 0.85

Calls 4

mac_mbuf_tag_initFunction · 0.85
m_tag_getFunction · 0.50
m_tag_freeFunction · 0.50
m_tag_prependFunction · 0.50

Tested by

no test coverage detected