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

Function mac_ifnet_check_transmit

freebsd/security/mac/mac_net.c:382–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380 "struct mbuf *");
381
382int
383mac_ifnet_check_transmit(struct ifnet *ifp, struct mbuf *m)
384{
385 struct label *label;
386 int error, locked;
387
388 M_ASSERTPKTHDR(m);
389
390 if (mac_policy_count == 0)
391 return (0);
392
393 label = mac_mbuf_to_label(m);
394
395 MAC_IFNET_LOCK(ifp, locked);
396 MAC_POLICY_CHECK_NOSLEEP(ifnet_check_transmit, ifp, ifp->if_label, m,
397 label);
398 MAC_CHECK_PROBE2(ifnet_check_transmit, error, ifp, m);
399 MAC_IFNET_UNLOCK(ifp, locked);
400
401 return (error);
402}
403
404int
405mac_ifnet_ioctl_get(struct ucred *cred, struct ifreq *ifr,

Callers 11

ieee80211_outputFunction · 0.85
stf_outputFunction · 0.85
gre_transmitFunction · 0.85
ether_outputFunction · 0.85
firewire_outputFunction · 0.85
me_transmitFunction · 0.85
gif_transmitFunction · 0.85
tunoutputFunction · 0.85
looutputFunction · 0.85
infiniband_outputFunction · 0.85
ipsec_transmitFunction · 0.85

Calls 1

mac_mbuf_to_labelFunction · 0.85

Tested by

no test coverage detected