Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 May 2002 19:07:39 -0700 (PDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 10629 for review
Message-ID:  <200205020207.g4227d651865@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=10629

Change 10629 by rwatson@rwatson_curry on 2002/05/01 19:07:37

	Various type, variable name, etc, fixes due to a poor merge from
	a local tree.

Affected files ...

... //depot/projects/trustedbsd/mac/sys/security/mac_ifoff/mac_ifoff.c#4 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/security/mac_ifoff/mac_ifoff.c#4 (text+ko) ====

@@ -93,11 +93,11 @@
     "is disabled");
 TUNABLE_INT("security.mac.ifoff.bpfrecv.enabled", &mac_ifoff_bpfrecv_enabled);
 
-int
+static int
 check_ifnet_outgoing(struct ifnet *ifnet)
 {
 
-	if (mac_ifoff_enabled == 0)
+	if (!mac_ifoff_enabled)
 		return (0);
 
 	if (mac_ifoff_lo_enabled && ifnet->if_type == IFT_LOOP)
@@ -109,10 +109,10 @@
 	return (EPERM);
 }
 
-int
+static int
 check_ifnet_incoming(struct ifnet *ifnet, int viabpf)
 {
-	if (mac_ifoff_enabled == 0)
+	if (!mac_ifoff_enabled)
 		return (0);
 
 	if (mac_ifoff_lo_enabled && ifnet->if_type == IFT_LOOP)  
@@ -121,7 +121,7 @@
 	if (mac_ifoff_other_enabled && ifnet->if_type != IFT_LOOP)
 		return (0);
 
-	if (isbpf && mac_ifoff_bpfrecv_enabled)
+	if (viabpf && mac_ifoff_bpfrecv_enabled)
 		return (0);
 
 	return (EPERM);
@@ -142,12 +142,13 @@
 	return (check_ifnet_incoming(ifnet, 1));
 }
 
+static int
 mac_ifoff_socket_check_receive_mbuf(struct socket *so, struct mbuf *m)
 {
 
 	if (m->m_flags & M_PKTHDR) {
 		if (m->m_pkthdr.rcvif != NULL)
-			return (check_ifnet_incoming(ifnet, 0));
+			return (check_ifnet_incoming(m->m_pkthdr.rcvif, 0));
 	}
 
 	return (0);

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205020207.g4227d651865>