On Thu, 9 Mar 2000, Boris Staeblow wrote:
> On Wed, Mar 08, 2000 at 11:15:23PM +0100, Luigi Rizzo wrote:
>
> > >
> > > Is it possible that bridging is broken in -current and -stable?
> >
> > no, but the "de" driver on bridging is now unsupported and i could not
> > find the time to make it work after recent fixes to the bridging code.
>
> Ooohhhhhhhh noooo! :-((
> The best nicīs all around are unsupported? ;)
>
> > can you switch to some supported card ("ed" or "fxp") ?
>
> Hmm, "ed" is lousy and "fxp" is too expensive for me now...
>
> How great is the chance that good old dec is coming back?
> I could help you testing your code... :)
>
> I would like to prevent to buy new hardware again.
I have what appear to be functional patches to provide support for if_dc,
used in the common and cheap PCI Linksys ethernet cards (LNE100TX?). If
jkh approves the commit, I can stick it in before the release. I don't
have access to an if_de card where I am currently, so won't be able to
look at that for at least a week or two.
The patch for if_dc is below.
Robert N M Watson
[EMAIL PROTECTED] http://www.watson.org/~robert/
PGP key fingerprint: AF B5 5F FF A6 4A 79 37 ED 5F 55 E9 58 04 6A B1
TIS Labs at Network Associates, Safeport Network Services
Index: if_dc.c
===================================================================
RCS file: /home/ncvs/src/sys/pci/if_dc.c,v
retrieving revision 1.7
diff -u -r1.7 if_dc.c
--- if_dc.c 2000/01/24 17:19:37 1.7
+++ if_dc.c 2000/03/08 18:15:55
@@ -122,6 +122,11 @@
#include <net/bpf.h>
+#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 */
@@ -2099,14 +2104,30 @@
ifp->if_ipackets++;
eh = mtod(m, struct ether_header *);
- /*
- * Handle BPF listeners. Let the BPF user see the packet, but
- * don't pass it up to the ether_input() layer unless it's
+ /* Handle BPF listeners. Let the BPF user see the packet */
+ if (ifp->if_bpf)
+ bpf_mtap(ifp, m);
+
+#ifdef BRIDGE
+ if (do_bridge) {
+ struct ifnet *bdg_ifp ;
+ bdg_ifp = bridge_in(m);
+ if (bdg_ifp != BDG_LOCAL && bdg_ifp != BDG_DROP)
+ bdg_forward(&m, bdg_ifp);
+ if (((bdg_ifp != BDG_LOCAL) && (bdg_ifp != BDG_BCAST) &&
+ (bdg_ifp != BDG_MCAST)) || bdg_ifp == BDG_DROP) {
+ m_freem(m);
+ continue;
+ }
+ }
+
+ eh = mtod(m, struct ether_header *);
+#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_bpf) {
- bpf_mtap(ifp, m);
if (ifp->if_flags & IFF_PROMISC &&
(bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr,
ETHER_ADDR_LEN) &&
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message