summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_tx.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/pci/if_tx.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/pci/if_tx.c')
-rw-r--r--sys/pci/if_tx.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/sys/pci/if_tx.c b/sys/pci/if_tx.c
index 0f37ca3..d575bca 100644
--- a/sys/pci/if_tx.c
+++ b/sys/pci/if_tx.c
@@ -52,7 +52,6 @@
#include <sys/queue.h>
#if defined(__FreeBSD__)
-#include "opt_bdg.h"
#define NBPFILTER 1
#include <net/if.h>
@@ -62,10 +61,6 @@
#include <net/bpf.h>
-#ifdef BRIDGE
-#include <net/bridge.h>
-#endif
-
#include <vm/vm.h> /* for vtophys */
#include <vm/pmap.h> /* for vtophys */
#include <machine/clock.h> /* for DELAY */
@@ -932,51 +927,6 @@ epic_rx_done(sc)
bpf_mtap( EPIC_BPFTAP_ARG(&sc->sc_if), m );
#endif /* NBPFILTER > 0 */
-#ifdef BRIDGE
- if (do_bridge) {
- struct ifnet *bdg_ifp ;
- bdg_ifp = bridge_in(m);
- if (bdg_ifp == BDG_DROP) {
- if (m)
- m_free(m);
- continue; /* and drop */
- }
- if (bdg_ifp != BDG_LOCAL)
- bdg_forward(&m, bdg_ifp);
- if (bdg_ifp != BDG_LOCAL && bdg_ifp != BDG_BCAST &&
- bdg_ifp != BDG_MCAST) {
- if (m)
- m_free(m);
- continue; /* and drop */
- }
- /* all others accepted locally */
- }
-#endif
-
-#if defined (__FreeBSD__)
- /*
- * This deserves explanation
- * If the bridge is _on_, then the following check
- * must not be done because occasionally the bridge
- * gets packets that are local but have the ethernet
- * address of one of the other interfaces.
- *
- * But if the bridge is off, then we have to drop
- * stuff that came in just via bpf.
- *
- * In OpenBSD such filter stands in ether_input. (?)
- */
- /* Accept only our packets, broadcasts and multicasts */
-#ifdef BRIDGE
- if (do_bridge)
-#endif
- if ((eh->ether_dhost[0] & 1) == 0 &&
- bcmp(eh->ether_dhost,sc->sc_macaddr,ETHER_ADDR_LEN)){
- m_freem(m);
- continue;
- }
-#endif
-
/* Second mbuf holds packet ifself */
m->m_pkthdr.len = m->m_len = len - sizeof(struct ether_header);
m->m_data += sizeof( struct ether_header );
OpenPOWER on IntegriCloud