Garbage collect mac_mbuf_create_multicast_encap TrustedBSD MAC Framework

entry point, which is no longer required now that we don't support
old-style multicast tunnels.  This removes the last mbuf object class
entry point that isn't init/copy/destroy.

Obtained from:	TrustedBSD Project
This commit is contained in:
Robert Watson 2007-10-28 17:55:57 +00:00
parent a13e21f7bc
commit 2a9e17ce8e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=173108
8 changed files with 0 additions and 87 deletions

View File

@ -152,8 +152,6 @@ int mac_kld_check_load(struct ucred *cred, struct vnode *vp);
int mac_kld_check_stat(struct ucred *cred);
void mac_mbuf_copy(struct mbuf *, struct mbuf *);
void mac_mbuf_create_multicast_encap(struct mbuf *m, struct ifnet *ifp,
struct mbuf *mnew);
int mac_mbuf_init(struct mbuf *, int);
void mac_mbuf_tag_copy(struct m_tag *, struct m_tag *);

View File

@ -319,21 +319,6 @@ mac_ifnet_create_mbuf(struct ifnet *ifp, struct mbuf *m)
MAC_IFNET_UNLOCK(ifp);
}
void
mac_mbuf_create_multicast_encap(struct mbuf *m, struct ifnet *ifp,
struct mbuf *mnew)
{
struct label *mlabel, *mnewlabel;
mlabel = mac_mbuf_to_label(m);
mnewlabel = mac_mbuf_to_label(mnew);
MAC_IFNET_LOCK(ifp);
MAC_PERFORM(mbuf_create_multicast_encap, m, mlabel, ifp,
ifp->if_label, mnew, mnewlabel);
MAC_IFNET_UNLOCK(ifp);
}
int
mac_bpfdesc_check_receive(struct bpf_d *d, struct ifnet *ifp)
{

View File

@ -221,10 +221,6 @@ typedef int (*mpo_kld_check_stat_t)(struct ucred *cred);
typedef void (*mpo_mbuf_copy_label_t)(struct label *src,
struct label *dest);
typedef void (*mpo_mbuf_create_multicast_encap_t)(struct mbuf *m,
struct label *mlabel, struct ifnet *ifp,
struct label *ifplabel, struct mbuf *mnew,
struct label *mnewlabel);
typedef void (*mpo_mbuf_destroy_label_t)(struct label *label);
typedef int (*mpo_mbuf_init_label_t)(struct label *label, int flag);
@ -692,7 +688,6 @@ struct mac_policy_ops {
mpo_kld_check_stat_t mpo_kld_check_stat;
mpo_mbuf_copy_label_t mpo_mbuf_copy_label;
mpo_mbuf_create_multicast_encap_t mpo_mbuf_create_multicast_encap;
mpo_mbuf_destroy_label_t mpo_mbuf_destroy_label;
mpo_mbuf_init_label_t mpo_mbuf_init_label;

View File

@ -1291,19 +1291,6 @@ biba_ifnet_create_mbuf(struct ifnet *ifp, struct label *ifplabel,
biba_copy_effective(source, dest);
}
static void
biba_mbuf_create_multicast_encap(struct mbuf *m, struct label *mlabel,
struct ifnet *ifp, struct label *ifplabel, struct mbuf *mnew,
struct label *mnewlabel)
{
struct mac_biba *source, *dest;
source = SLOT(mlabel);
dest = SLOT(mnewlabel);
biba_copy_effective(source, dest);
}
static int
biba_ipq_match(struct mbuf *m, struct label *mlabel, struct ipq *ipq,
struct label *ipqlabel)
@ -3367,7 +3354,6 @@ static struct mac_policy_ops mac_biba_ops =
.mpo_inpcb_create_mbuf = biba_inpcb_create_mbuf,
.mpo_bpfdesc_create_mbuf = biba_bpfdesc_create_mbuf,
.mpo_ifnet_create_mbuf = biba_ifnet_create_mbuf,
.mpo_mbuf_create_multicast_encap = biba_mbuf_create_multicast_encap,
.mpo_ipq_match = biba_ipq_match,
.mpo_ifnet_relabel = biba_ifnet_relabel,
.mpo_ipq_update = biba_ipq_update,

View File

@ -1355,19 +1355,6 @@ lomac_ifnet_create_mbuf(struct ifnet *ifp, struct label *ifplabel,
lomac_copy_single(source, dest);
}
static void
lomac_mbuf_create_multicast_encap(struct mbuf *m, struct label *mlabel,
struct ifnet *ifp, struct label *ifplabel, struct mbuf *mnew,
struct label *mnewlabel)
{
struct mac_lomac *source, *dest;
source = SLOT(mlabel);
dest = SLOT(mnewlabel);
lomac_copy_single(source, dest);
}
static int
lomac_ipq_match(struct mbuf *m, struct label *mlabel, struct ipq *ipq,
struct label *ipqlabel)
@ -2925,7 +2912,6 @@ static struct mac_policy_ops lomac_ops =
.mpo_inpcb_create_mbuf = lomac_inpcb_create_mbuf,
.mpo_bpfdesc_create_mbuf = lomac_bpfdesc_create_mbuf,
.mpo_ifnet_create_mbuf = lomac_ifnet_create_mbuf,
.mpo_mbuf_create_multicast_encap = lomac_mbuf_create_multicast_encap,
.mpo_ipq_match = lomac_ipq_match,
.mpo_ifnet_relabel = lomac_ifnet_relabel,
.mpo_ipq_update = lomac_ipq_update,

View File

@ -1213,19 +1213,6 @@ mls_ifnet_create_mbuf(struct ifnet *ifp, struct label *ifplabel,
mls_copy_effective(source, dest);
}
static void
mls_mbuf_create_multicast_encap(struct mbuf *m, struct label *mlabel,
struct ifnet *ifp, struct label *ifplabel, struct mbuf *mnew,
struct label *mnewlabel)
{
struct mac_mls *source, *dest;
source = SLOT(mlabel);
dest = SLOT(mnewlabel);
mls_copy_effective(source, dest);
}
static int
mls_ipq_match(struct mbuf *m, struct label *mlabel, struct ipq *ipq,
struct label *ipqlabel)
@ -2994,7 +2981,6 @@ static struct mac_policy_ops mls_ops =
.mpo_inpcb_create_mbuf = mls_inpcb_create_mbuf,
.mpo_bpfdesc_create_mbuf = mls_bpfdesc_create_mbuf,
.mpo_ifnet_create_mbuf = mls_ifnet_create_mbuf,
.mpo_mbuf_create_multicast_encap = mls_mbuf_create_multicast_encap,
.mpo_ipq_match = mls_ipq_match,
.mpo_ifnet_relabel = mls_ifnet_relabel,
.mpo_ipq_update = mls_ipq_update,

View File

@ -418,14 +418,6 @@ stub_ifnet_create_mbuf(struct ifnet *ifp, struct label *ifplabel,
}
static void
stub_mbuf_create_multicast_encap(struct mbuf *m, struct label *mlabel,
struct ifnet *ifp, struct label *ifplabel, struct mbuf *mnew,
struct label *mnewlabel)
{
}
static void
stub_netatalk_aarp_send(struct ifnet *ifp, struct label *iflpabel,
struct mbuf *m, struct label *mlabel)
@ -1551,7 +1543,6 @@ static struct mac_policy_ops stub_ops =
.mpo_inpcb_create_mbuf = stub_inpcb_create_mbuf,
.mpo_bpfdesc_create_mbuf = stub_bpfdesc_create_mbuf,
.mpo_ifnet_create_mbuf = stub_ifnet_create_mbuf,
.mpo_mbuf_create_multicast_encap = stub_mbuf_create_multicast_encap,
.mpo_netatalk_aarp_send = stub_netatalk_aarp_send,
.mpo_netinet_arp_send = stub_netinet_arp_send,
.mpo_netinet_firewall_reply = stub_netinet_firewall_reply,

View File

@ -1037,19 +1037,6 @@ test_ifnet_create_mbuf(struct ifnet *ifp, struct label *ifplabel,
COUNTER_INC(ifnet_create_mbuf);
}
COUNTER_DECL(mbuf_create_multicast_encap);
static void
test_mbuf_create_multicast_encap(struct mbuf *oldmbuf,
struct label *oldmbuflabel, struct ifnet *ifp, struct label *ifplabel,
struct mbuf *newmbuf, struct label *newmbuflabel)
{
LABEL_CHECK(oldmbuflabel, MAGIC_MBUF);
LABEL_CHECK(ifplabel, MAGIC_IFNET);
LABEL_CHECK(newmbuflabel, MAGIC_MBUF);
COUNTER_INC(mbuf_create_multicast_encap);
}
COUNTER_DECL(ipq_match);
static int
test_ipq_match(struct mbuf *fragment, struct label *fragmentlabel,
@ -2720,7 +2707,6 @@ static struct mac_policy_ops test_ops =
.mpo_inpcb_create_mbuf = test_inpcb_create_mbuf,
.mpo_bpfdesc_create_mbuf = test_bpfdesc_create_mbuf,
.mpo_ifnet_create_mbuf = test_ifnet_create_mbuf,
.mpo_mbuf_create_multicast_encap = test_mbuf_create_multicast_encap,
.mpo_ipq_match = test_ipq_match,
.mpo_netatalk_aarp_send = test_netatalk_aarp_send,
.mpo_netinet_arp_send = test_netinet_arp_send,