From owner-p4-projects Wed May 1 19: 7:47 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6ABC137B41C; Wed, 1 May 2002 19:07:40 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A468E37B41A for ; Wed, 1 May 2002 19:07:39 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g4227d651865 for perforce@freebsd.org; Wed, 1 May 2002 19:07:39 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 1 May 2002 19:07:39 -0700 (PDT) Message-Id: <200205020207.g4227d651865@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 10629 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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