mac_ifoff.c (113687) | mac_ifoff.c (117247) |
---|---|
1/*- 2 * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson 3 * Copyright (c) 2001, 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed by Robert Watson for the TrustedBSD Project. 7 * 8 * This software was developed for the FreeBSD Project in part by Network --- 17 unchanged lines hidden (view full) --- 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * | 1/*- 2 * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson 3 * Copyright (c) 2001, 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed by Robert Watson for the TrustedBSD Project. 7 * 8 * This software was developed for the FreeBSD Project in part by Network --- 17 unchanged lines hidden (view full) --- 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * |
34 * $FreeBSD: head/sys/security/mac_ifoff/mac_ifoff.c 113687 2003-04-18 20:22:23Z rwatson $ | 34 * $FreeBSD: head/sys/security/mac_ifoff/mac_ifoff.c 117247 2003-07-05 01:24:36Z rwatson $ |
35 */ 36 37/* 38 * Developed by the TrustedBSD Project. 39 * Limit access to interfaces until they are specifically administratively 40 * enabled. Prevents protocol stack-driven packet leakage in unsafe 41 * environments. 42 */ --- 66 unchanged lines hidden (view full) --- 109} 110 111static int 112check_ifnet_incoming(struct ifnet *ifnet, int viabpf) 113{ 114 if (!mac_ifoff_enabled) 115 return (0); 116 | 35 */ 36 37/* 38 * Developed by the TrustedBSD Project. 39 * Limit access to interfaces until they are specifically administratively 40 * enabled. Prevents protocol stack-driven packet leakage in unsafe 41 * environments. 42 */ --- 66 unchanged lines hidden (view full) --- 109} 110 111static int 112check_ifnet_incoming(struct ifnet *ifnet, int viabpf) 113{ 114 if (!mac_ifoff_enabled) 115 return (0); 116 |
117 if (mac_ifoff_lo_enabled && ifnet->if_type == IFT_LOOP) | 117 if (mac_ifoff_lo_enabled && ifnet->if_type == IFT_LOOP) |
118 return (0); 119 120 if (mac_ifoff_other_enabled && ifnet->if_type != IFT_LOOP) 121 return (0); 122 123 if (viabpf && mac_ifoff_bpfrecv_enabled) 124 return (0); 125 --- 40 unchanged lines hidden --- | 118 return (0); 119 120 if (mac_ifoff_other_enabled && ifnet->if_type != IFT_LOOP) 121 return (0); 122 123 if (viabpf && mac_ifoff_bpfrecv_enabled) 124 return (0); 125 --- 40 unchanged lines hidden --- |