Deleted Added
full compact
if_ethersubr.c (101345) if_ethersubr.c (102099)
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 101345 2002-08-04 23:55:06Z luigi $
34 * $FreeBSD: head/sys/net/if_ethersubr.c 102099 2002-08-19 15:16:38Z sobomax $
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_mac.h"

--- 629 unchanged lines hidden (view full) ---

672 if (! (BDG_ACTIVE(ifp) ) )
673 /* Discard packet if upper layers shouldn't see it because it was
674 unicast to a different Ethernet address. If the driver is working
675 properly, then this situation can only happen when the interface
676 is in promiscuous mode. */
677 if ((ifp->if_flags & IFF_PROMISC) != 0
678 && (eh->ether_dhost[0] & 1) == 0
679 && bcmp(eh->ether_dhost,
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_mac.h"

--- 629 unchanged lines hidden (view full) ---

672 if (! (BDG_ACTIVE(ifp) ) )
673 /* Discard packet if upper layers shouldn't see it because it was
674 unicast to a different Ethernet address. If the driver is working
675 properly, then this situation can only happen when the interface
676 is in promiscuous mode. */
677 if ((ifp->if_flags & IFF_PROMISC) != 0
678 && (eh->ether_dhost[0] & 1) == 0
679 && bcmp(eh->ether_dhost,
680 IFP2AC(ifp)->ac_enaddr, ETHER_ADDR_LEN) != 0) {
680 IFP2AC(ifp)->ac_enaddr, ETHER_ADDR_LEN) != 0
681 && (ifp->if_flags && IFF_PPROMISC) == 0) {
681 m_freem(m);
682 return;
683 }
684
685 /* Discard packet if interface is not up */
686 if ((ifp->if_flags & IFF_UP) == 0) {
687 m_freem(m);
688 return;

--- 382 unchanged lines hidden (view full) ---

1071 default:
1072 /*
1073 * Well, the text isn't quite right, but it's the name
1074 * that counts...
1075 */
1076 return EAFNOSUPPORT;
1077 }
1078}
682 m_freem(m);
683 return;
684 }
685
686 /* Discard packet if interface is not up */
687 if ((ifp->if_flags & IFF_UP) == 0) {
688 m_freem(m);
689 return;

--- 382 unchanged lines hidden (view full) ---

1072 default:
1073 /*
1074 * Well, the text isn't quite right, but it's the name
1075 * that counts...
1076 */
1077 return EAFNOSUPPORT;
1078 }
1079}
1079