FreeBSD Bugzilla – Attachment 6831 Details for
Bug 15206
Ethernet driver if_vr.c (VIA Technologies)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.95 KB, created by
vak
on 1999-12-01 13:40:03 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
vak
Created:
1999-12-01 13:40:03 UTC
Size:
1.95 KB
patch
obsolete
>--- if_vr33.c Wed Dec 1 16:08:38 1999 >+++ if_vr.c Wed Dec 1 16:00:23 1999 >@@ -79,6 +79,11 @@ > #include <net/bpf.h> > #endif > >+#include "opt_bdg.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 */ >@@ -1318,22 +1323,43 @@ > m->m_pkthdr.len = m->m_len = total_len; > #if NBPFILTER > 0 > /* >- * Handle BPF listeners. Let the BPF user see the packet, but >- * don't pass it up to the ether_input() layer unless it's >- * a broadcast packet, multicast packet, matches our ethernet >- * address or the interface is in promiscuous mode. >+ * Handle BPF listeners. Let the BPF user see the packet. > */ >- if (ifp->if_bpf) { >+ if (ifp->if_bpf) > bpf_mtap(ifp, m); >- if (ifp->if_flags & IFF_PROMISC && >- (bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr, >- ETHER_ADDR_LEN) && >- (eh->ether_dhost[0] & 1) == 0)) { >+#endif >+#ifdef BRIDGE /* see code in if_ed.c */ >+ if (do_bridge) { >+ struct ifnet *bdg_ifp ; >+ bdg_ifp = bridge_in(m); >+ if (bdg_ifp == BDG_DROP) { > m_freem(m); > continue; > } >+ if (bdg_ifp != BDG_LOCAL) >+ bdg_forward(&m, bdg_ifp); >+ if (bdg_ifp != BDG_LOCAL && bdg_ifp != BDG_BCAST && >+ bdg_ifp != BDG_MCAST) { >+ /* not local and not multicast, just drop it */ >+ if (m) >+ m_freem(m); >+ continue; >+ } >+ /* all others accepted locally */ > } > #endif >+ /* >+ * Don't pass it up to the ether_input() layer unless it's >+ * a broadcast packet, multicast packet, matches our ethernet >+ * address or the interface is in promiscuous mode. >+ */ >+ if (ifp->if_flags & IFF_PROMISC && >+ (bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr, >+ ETHER_ADDR_LEN) && >+ (eh->ether_dhost[0] & 1) == 0)) { >+ m_freem(m); >+ continue; >+ } > /* Remove header from mbuf and pass it on. */ > m_adj(m, sizeof(struct ether_header)); > ether_input(ifp, eh, m);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 15206
: 6831