summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/if_le.c
diff options
context:
space:
mode:
authorarchie <archie@FreeBSD.org>2000-05-14 02:18:43 +0000
committerarchie <archie@FreeBSD.org>2000-05-14 02:18:43 +0000
commitfa21035b4e2f11d2c8f90174690853600b670e2d (patch)
tree9afb8dacfff6d7607064d8aa2bbf2da5069e8be6 /sys/i386/isa/if_le.c
parentd066b073153b986a54fd18a31d6bcc5d697933a2 (diff)
downloadFreeBSD-src-fa21035b4e2f11d2c8f90174690853600b670e2d.zip
FreeBSD-src-fa21035b4e2f11d2c8f90174690853600b670e2d.tar.gz
Move code to handle BPF and bridging for incoming Ethernet packets out
of the individual drivers and into the common routine ether_input(). Also, remove the (incomplete) hack for matching ethernet headers in the ip_fw code. The good news: net result of 1016 lines removed, and this should make bridging now work with *all* Ethernet drivers. The bad news: it's nearly impossible to test every driver, especially for bridging, and I was unable to get much testing help on the mailing lists. Reviewed by: freebsd-net
Diffstat (limited to 'sys/i386/isa/if_le.c')
-rw-r--r--sys/i386/isa/if_le.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/sys/i386/isa/if_le.c b/sys/i386/isa/if_le.c
index 2050196..35951a6 100644
--- a/sys/i386/isa/if_le.c
+++ b/sys/i386/isa/if_le.c
@@ -203,9 +203,6 @@ struct le_softc {
le_mcbits_t *le_mctbl; /* pointer to multicast table */
const char *le_prodname; /* product name DE20x-xx */
u_char le_hwaddr[6]; /* local copy of hwaddr */
- unsigned le_scast_drops; /* singlecast drops */
- unsigned le_mcast_drops; /* multicast drops */
- unsigned le_bcast_drops; /* broadcast drops */
union {
#if !defined(LE_NOLEMAC)
struct le_lemac_info un_lemac; /* LEMAC specific information */
@@ -394,27 +391,6 @@ le_input(
}
MEMCPY(&eh, seg1, sizeof(eh));
- if (sc->le_if.if_bpf != NULL && seg2 == NULL) {
- bpf_tap(&sc->le_if, seg1, total_len);
- /*
- * If this is single cast but not to us
- * drop it!
- */
- if ((eh.ether_dhost[0] & 1) == 0) {
- if (!LE_ADDREQUAL(eh.ether_dhost, sc->le_ac.ac_enaddr)) {
- sc->le_scast_drops++;
- return;
- }
- } else if ((sc->le_flags & IFF_MULTICAST) == 0) {
- sc->le_mcast_drops++;
- return;
- } else if (sc->le_flags & LE_BRDCSTONLY) {
- if (!LE_ADDRBRDCST(eh.ether_dhost)) {
- sc->le_bcast_drops++;
- return;
- }
- }
- }
seg1 += sizeof(eh); total_len -= sizeof(eh); len1 -= sizeof(eh);
MGETHDR(m, M_DONTWAIT, MT_DATA);
@@ -449,30 +425,6 @@ le_input(
MEMCPY(mtod(m, caddr_t), seg1, len1);
if (seg2 != NULL)
MEMCPY(mtod(m, caddr_t) + len1, seg2, total_len - len1);
- if (sc->le_if.if_bpf != NULL && seg2 != NULL) {
- bpf_mtap(&sc->le_if, m);
- /*
- * If this is single cast but not to us
- * drop it!
- */
- if ((eh.ether_dhost[0] & 1) == 0) {
- if (!LE_ADDREQUAL(eh.ether_dhost, sc->le_ac.ac_enaddr)) {
- sc->le_scast_drops++;
- m_freem(m);
- return;
- }
- } else if ((sc->le_flags & IFF_MULTICAST) == 0) {
- sc->le_mcast_drops++;
- m_freem(m);
- return;
- } else if (sc->le_flags & LE_BRDCSTONLY) {
- if (!LE_ADDRBRDCST(eh.ether_dhost)) {
- sc->le_bcast_drops++;
- m_freem(m);
- return;
- }
- }
- }
ether_input(&sc->le_if, &eh, m);
}
OpenPOWER on IntegriCloud