Date: Wed, 8 Mar 2000 21:58:30 -0500 (EST) From: Robert Watson <robert@cyrus.watson.org> To: Boris Staeblow <balu@dva.in-berlin.de>, jkh@freebsd.org Cc: Luigi Rizzo <luigi@info.iet.unipi.it>, freebsd-current@freebsd.org Subject: Re: bridging broken in -current AND -stable Message-ID: <Pine.NEB.3.96L.1000308214546.30544A-100000@fledge.watson.org> In-Reply-To: <20000309000454.A37304@dva.in-berlin.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 9 Mar 2000, Boris Staeblow wrote: > On Wed, Mar 08, 2000 at 11:15:23PM +0100, Luigi Rizzo wrote: >=20 > > >=20 > > > Is it possible that bridging is broken in -current and -stable? > >=20 > > 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. >=20 > Ooohhhhhhhh noooo! :-(( > The best nic=B4s all around are unsupported? ;) >=20 > > can you switch to some supported card ("ed" or "fxp") ? >=20 > Hmm, "ed" is lousy and "fxp" is too expensive for me now... >=20 > How great is the chance that good old dec is coming back? > I could help you testing your code... :) >=20 > 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=20 robert@fledge.watson.org 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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=092000/01/24 17:19:37=091.7 +++ if_dc.c=092000/03/08 18:15:55 @@ -122,6 +122,11 @@ =20 #include <net/bpf.h> =20 +#include "opt_bdg.h" +#ifdef BRIDGE=20 +#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 @@ =09=09ifp->if_ipackets++; =09=09eh =3D mtod(m, struct ether_header *); =20 -=09=09/* -=09=09 * Handle BPF listeners. Let the BPF user see the packet, but -=09=09 * don't pass it up to the ether_input() layer unless it's +=09=09/* Handle BPF listeners. Let the BPF user see the packet */ +=09=09if (ifp->if_bpf) +=09=09=09bpf_mtap(ifp, m); + +#ifdef BRIDGE +=09=09if (do_bridge) { +=09=09=09struct ifnet *bdg_ifp ; +=09=09=09bdg_ifp =3D bridge_in(m); +=09=09=09if (bdg_ifp !=3D BDG_LOCAL && bdg_ifp !=3D BDG_DROP) +=09=09=09=09bdg_forward(&m, bdg_ifp); +=09=09=09if (((bdg_ifp !=3D BDG_LOCAL) && (bdg_ifp !=3D BDG_BCAST) &&=09= =09=09 (bdg_ifp !=3D BDG_MCAST)) || bdg_ifp =3D=3D BDG_DROP) { +=09=09=09=09m_freem(m); +=09=09=09=09continue; +=09=09=09} +=09=09} + +=09eh =3D mtod(m, struct ether_header *); +#endif + +=09=09/* Don't pass it up to the ether_input() layer unless it's =09=09 * a broadcast packet, multicast packet, matches our ethernet =09=09 * address or the interface is in promiscuous mode. =09=09 */ =09=09if (ifp->if_bpf) { -=09=09=09bpf_mtap(ifp, m); =09=09=09if (ifp->if_flags & IFF_PROMISC && =09=09=09=09(bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr, =09=09=09=09 ETHER_ADDR_LEN) && To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1000308214546.30544A-100000>