mirror of
https://github.com/opnsense/src.git
synced 2026-02-14 00:04:14 -05:00
the MAC label referenced from 'struct socket' in the IPv4 and IPv6-based protocols. This permits MAC labels to be checked during network delivery operations without dereferencing inp->inp_socket to get to so->so_label, which will eventually avoid our having to grab the socket lock during delivery at the network layer. This change introduces 'struct inpcb' as a labeled object to the MAC Framework, along with the normal circus of entry points: initialization, creation from socket, destruction, as well as a delivery access control check. For most policies, the inpcb label will simply be a cache of the socket label, so a new protocol switch method is introduced, pr_sosetlabel() to notify protocols that the socket layer label has been updated so that the cache can be updated while holding appropriate locks. Most protocols implement this using pru_sosetlabel_null(), but IPv4/IPv6 protocols using inpcbs use the the worker function in_pcbsosetlabel(), which calls into the MAC Framework to perform a cache update. Biba, LOMAC, and MLS implement these entry points, as do the stub policy, and test policy. Reviewed by: sam, bms Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories |
||
|---|---|---|
| .. | ||
| ah.h | ||
| ah_var.h | ||
| esp.h | ||
| esp_var.h | ||
| ipcomp.h | ||
| ipcomp_var.h | ||
| ipip_var.h | ||
| ipsec.c | ||
| ipsec.h | ||
| ipsec6.h | ||
| ipsec_input.c | ||
| ipsec_mbuf.c | ||
| ipsec_osdep.h | ||
| ipsec_output.c | ||
| key.c | ||
| key.h | ||
| key_debug.c | ||
| key_debug.h | ||
| key_var.h | ||
| keydb.h | ||
| keysock.c | ||
| keysock.h | ||
| xform.h | ||
| xform_ah.c | ||
| xform_esp.c | ||
| xform_ipcomp.c | ||
| xform_ipip.c | ||