Lines Matching full:label
75 static struct label *
78 struct label *label;
81 label = mac_labelzone_alloc(flag);
82 if (label == NULL)
85 MAC_POLICY_CHECK(inpcb_init_label, label, flag);
87 MAC_POLICY_CHECK_NOSLEEP(inpcb_init_label, label, flag);
89 MAC_POLICY_PERFORM_NOSLEEP(inpcb_destroy_label, label);
90 mac_labelzone_free(label);
93 return (label);
120 static struct label *
123 struct label *label;
126 label = mac_labelzone_alloc(flag);
127 if (label == NULL)
131 MAC_POLICY_CHECK(ipq_init_label, label, flag);
133 MAC_POLICY_CHECK_NOSLEEP(ipq_init_label, label, flag);
135 MAC_POLICY_PERFORM_NOSLEEP(ipq_destroy_label, label);
136 mac_labelzone_free(label);
139 return (label);
156 mac_inpcb_label_free(struct label *label)
159 MAC_POLICY_PERFORM_NOSLEEP(inpcb_destroy_label, label);
160 mac_labelzone_free(label);
174 mac_ipq_label_free(struct label *label)
177 MAC_POLICY_PERFORM_NOSLEEP(ipq_destroy_label, label);
178 mac_labelzone_free(label);
202 struct label *label;
207 label = mac_mbuf_to_label(m);
210 label);
216 struct label *mlabel, *fraglabel;
231 struct label *label;
236 label = mac_mbuf_to_label(m);
238 MAC_POLICY_PERFORM_NOSLEEP(ipq_create, m, label, q, q->ipq_label);
244 struct label *mlabel;
260 struct label *label;
266 label = mac_mbuf_to_label(m);
269 MAC_POLICY_BOOLEAN_NOSLEEP(ipq_match, &&, m, label, q, q->ipq_label);
277 struct label *mlabel;
294 struct label *mrecvlabel, *msendlabel;
309 struct label *label;
314 label = mac_mbuf_to_label(m);
316 MAC_POLICY_PERFORM_NOSLEEP(netinet_icmp_replyinplace, m, label);
322 struct label *mlabel;
339 struct label *label;
344 label = mac_mbuf_to_label(m);
346 MAC_POLICY_PERFORM_NOSLEEP(netinet_tcp_reply, m, label);
352 struct label *label;
357 label = mac_mbuf_to_label(m);
359 MAC_POLICY_PERFORM_NOSLEEP(ipq_update, m, label, q, q->ipq_label);
368 struct label *label;
376 label = mac_mbuf_to_label(m);
379 label);
416 struct label *mrecvlabel, *msendlabel;
434 struct label *label;
441 label = mac_mbuf_to_label(m);
443 MAC_POLICY_PERFORM_NOSLEEP(netinet_firewall_send, m, label);
448 * instead of the label. However, due to some of the complexities associated
449 * with exposing this syncache structure we operate directly on its label
452 * label storage so we can properly initialize mbuf labels for any packets
456 mac_syncache_destroy(struct label **label)
459 if (*label != NULL) {
460 MAC_POLICY_PERFORM_NOSLEEP(syncache_destroy_label, *label);
461 mac_labelzone_free(*label);
462 *label = NULL;
467 mac_syncache_init(struct label **label)
472 *label = mac_labelzone_alloc(M_NOWAIT);
473 if (*label == NULL)
477 * allocate policy specific label storage using M_WAITOK. So
482 MAC_POLICY_CHECK_NOSLEEP(syncache_init_label, *label,
486 *label);
487 mac_labelzone_free(*label);
488 *label = NULL;
492 *label = NULL;
497 mac_syncache_create(struct label *label, struct inpcb *inp)
502 MAC_POLICY_PERFORM_NOSLEEP(syncache_create, label, inp);
506 mac_syncache_create_mbuf(struct label *sc_label, struct mbuf *m)
508 struct label *mlabel;