summaryrefslogtreecommitdiffstats
path: root/sys/security/mac/mac_framework.h
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2003-12-17 14:55:11 +0000
committerrwatson <rwatson@FreeBSD.org>2003-12-17 14:55:11 +0000
commit8315bb904de1f1c34053b85fab46b2f15bea6d42 (patch)
tree6f403547f45a548d093633ddb92a1c06f17404e9 /sys/security/mac/mac_framework.h
parent71deee9e60194502532d1e090e2a0342fd47c484 (diff)
downloadFreeBSD-src-8315bb904de1f1c34053b85fab46b2f15bea6d42.zip
FreeBSD-src-8315bb904de1f1c34053b85fab46b2f15bea6d42.tar.gz
Switch TCP over to using the inpcb label when responding in timed
wait, rather than the socket label. This avoids reaching up to the socket layer during connection close, which requires locking changes. To do this, introduce MAC Framework entry point mac_create_mbuf_from_inpcb(), which is called from tcp_twrespond() instead of calling mac_create_mbuf_from_socket() or mac_create_mbuf_netlayer(). Introduce MAC Policy entry point mpo_create_mbuf_from_inpcb(), and implementations for various policies, which generally just copy label data from the inpcb to the mbuf. Assert the inpcb lock in the entry point since we require consistency for the inpcb label reference. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys/security/mac/mac_framework.h')
-rw-r--r--sys/security/mac/mac_framework.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/security/mac/mac_framework.h b/sys/security/mac/mac_framework.h
index 098a2bd..ed04abd 100644
--- a/sys/security/mac/mac_framework.h
+++ b/sys/security/mac/mac_framework.h
@@ -213,6 +213,7 @@ void mac_create_inpcb_from_socket(struct socket *so, struct inpcb *inp);
void mac_create_ipq(struct mbuf *fragment, struct ipq *ipq);
void mac_create_datagram_from_ipq(struct ipq *ipq, struct mbuf *datagram);
void mac_create_fragment(struct mbuf *datagram, struct mbuf *fragment);
+void mac_create_mbuf_from_inpcb(struct inpcb *inp, struct mbuf *m);
void mac_create_mbuf_from_mbuf(struct mbuf *oldmbuf, struct mbuf *newmbuf);
void mac_create_mbuf_linklayer(struct ifnet *ifnet, struct mbuf *m);
void mac_create_mbuf_from_bpfdesc(struct bpf_d *bpf_d, struct mbuf *m);
OpenPOWER on IntegriCloud