aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/de
diff options
context:
space:
mode:
authorArchie Cobbs <archie@FreeBSD.org>2000-05-14 02:18:43 +0000
committerArchie Cobbs <archie@FreeBSD.org>2000-05-14 02:18:43 +0000
commit2e2de7f23f09ed445e6d2503174e890cc64b9a7c (patch)
tree3bb6d87c220b15e365d011925cab4b92d4ba1bb9 /sys/dev/de
parente3227bc7a68281f480934b30853e25233d70f57d (diff)
downloadsrc-2e2de7f23f09ed445e6d2503174e890cc64b9a7c.tar.gz
src-2e2de7f23f09ed445e6d2503174e890cc64b9a7c.zip
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
Notes
Notes: svn path=/head/; revision=60536
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 8054bd524532..e949c9413eb1 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