if_ethersubr.c (87843) | if_ethersubr.c (87912) |
---|---|
1/* 2 * Copyright (c) 1982, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93 | 1/* 2 * Copyright (c) 1982, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93 |
34 * $FreeBSD: head/sys/net/if_ethersubr.c 87843 2001-12-14 04:41:07Z dg $ | 34 * $FreeBSD: head/sys/net/if_ethersubr.c 87912 2001-12-14 19:28:06Z jlemon $ |
35 */ 36 37#include "opt_atalk.h" 38#include "opt_inet.h" 39#include "opt_inet6.h" 40#include "opt_ipx.h" 41#include "opt_bdg.h" 42#include "opt_netgraph.h" --- 442 unchanged lines hidden (view full) --- 485 struct ether_header *eh; 486 struct mbuf *m; 487{ 488 struct ifqueue *inq; 489 u_short ether_type; 490#if defined(NETATALK) 491 register struct llc *l; 492#endif | 35 */ 36 37#include "opt_atalk.h" 38#include "opt_inet.h" 39#include "opt_inet6.h" 40#include "opt_ipx.h" 41#include "opt_bdg.h" 42#include "opt_netgraph.h" --- 442 unchanged lines hidden (view full) --- 485 struct ether_header *eh; 486 struct mbuf *m; 487{ 488 struct ifqueue *inq; 489 u_short ether_type; 490#if defined(NETATALK) 491 register struct llc *l; 492#endif |
493 |
|
493 if (! (BDG_ACTIVE(ifp) ) ) 494 /* Discard packet if upper layers shouldn't see it because it was 495 unicast to a different Ethernet address. If the driver is working 496 properly, then this situation can only happen when the interface 497 is in promiscuous mode. */ 498 if ((ifp->if_flags & IFF_PROMISC) != 0 499 && (eh->ether_dhost[0] & 1) == 0 500 && bcmp(eh->ether_dhost, --- 382 unchanged lines hidden --- | 494 if (! (BDG_ACTIVE(ifp) ) ) 495 /* Discard packet if upper layers shouldn't see it because it was 496 unicast to a different Ethernet address. If the driver is working 497 properly, then this situation can only happen when the interface 498 is in promiscuous mode. */ 499 if ((ifp->if_flags & IFF_PROMISC) != 0 500 && (eh->ether_dhost[0] & 1) == 0 501 && bcmp(eh->ether_dhost, --- 382 unchanged lines hidden --- |