aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2003-04-18 20:22:23 +0000
committerRobert Watson <rwatson@FreeBSD.org>2003-04-18 20:22:23 +0000
commit535cf73341146fc4ab034ac752af512ecee5a7bc (patch)
treeb0ae495bda73100c0e40be059756a246916cf8e1 /sys
parent889a6b5845d3937ad0cce31217fdbc054720f45d (diff)
Rather than check for M_PKTHDR and conditionally perform access control,
simply assert that M_PKTHDR is set using M_ASSERTPKTHDR(). Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
Notes
Notes: svn path=/head/; revision=113687
Diffstat (limited to 'sys')
-rw-r--r--sys/security/mac_ifoff/mac_ifoff.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/security/mac_ifoff/mac_ifoff.c b/sys/security/mac_ifoff/mac_ifoff.c
index 941d48efd369..286e8dd6d863 100644
--- a/sys/security/mac_ifoff/mac_ifoff.c
+++ b/sys/security/mac_ifoff/mac_ifoff.c
@@ -147,10 +147,9 @@ mac_ifoff_check_socket_deliver(struct socket *so, struct label *socketlabel,
struct mbuf *m, struct label *mbuflabel)
{
- if (m->m_flags & M_PKTHDR) {
- if (m->m_pkthdr.rcvif != NULL)
- return (check_ifnet_incoming(m->m_pkthdr.rcvif, 0));
- }
+ M_ASSERTPKTHDR(m);
+ if (m->m_pkthdr.rcvif != NULL)
+ return (check_ifnet_incoming(m->m_pkthdr.rcvif, 0));
return (0);
}