summaryrefslogtreecommitdiffstats
path: root/sys/dev/de
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/dev/de
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/dev/de')
-rw-r--r--sys/dev/de/if_de.c29
1 files changed, 2 insertions, 27 deletions
diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c
index 8054bd5..e949c94 100644
--- a/sys/dev/de/if_de.c
+++ b/sys/dev/de/if_de.c
@@ -89,11 +89,6 @@
#include <pci/pcireg.h>
#include <pci/dc21040reg.h>
-#include "opt_bdg.h"
-#ifdef BRIDGE
-#include <net/bridge.h>
-#endif
-
/*
* Intel CPUs should use I/O mapped access.
*/
@@ -3475,34 +3470,15 @@ tulip_rx_intr(
#endif /* TULIP_BUS_DMA */
eh = *mtod(ms, struct ether_header *);
+#ifndef __FreeBSD__
if (sc->tulip_if.if_bpf != NULL) {
if (me == ms)
bpf_tap(&sc->tulip_if, mtod(ms, caddr_t), total_len);
else
bpf_mtap(&sc->tulip_if, ms);
}
+#endif
sc->tulip_flags |= TULIP_RXACT;
-
-#ifdef BRIDGE /* see code in if_ed.c */
- ms->m_pkthdr.rcvif = ifp; /* XXX */
- ms->m_pkthdr.len = total_len; /* XXX */
- if (do_bridge) {
- struct ifnet *bdg_ifp ;
- bdg_ifp = bridge_in(ms);
- if (bdg_ifp == BDG_DROP)
- goto next ; /* and drop */
- if (bdg_ifp != BDG_LOCAL)
- bdg_forward(&ms, bdg_ifp);
- if (bdg_ifp != BDG_LOCAL && bdg_ifp != BDG_BCAST &&
- bdg_ifp != BDG_MCAST)
- goto next ; /* and drop */
- /* all others accepted locally */
- } else
-#endif
- if ((sc->tulip_flags & (TULIP_PROMISC|TULIP_HASHONLY))
- && (eh.ether_dhost[0] & 1) == 0
- && !TULIP_ADDREQUAL(eh.ether_dhost, sc->tulip_enaddr))
- goto next;
accept = 1;
} else {
ifp->if_ierrors++;
@@ -3551,7 +3527,6 @@ tulip_rx_intr(
#endif
#endif /* TULIP_BUS_DMA */
}
- next:
#if defined(TULIP_DEBUG)
cnt++;
#endif
OpenPOWER on IntegriCloud