From owner-freebsd-current Wed Mar 8 18:57:38 2000 Delivered-To: freebsd-current@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id E3CAC37B720; Wed, 8 Mar 2000 18:57:32 -0800 (PST) (envelope-from robert@cyrus.watson.org) Received: from fledge.watson.org (robert@fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.9.3/8.9.3) with SMTP id VAA30619; Wed, 8 Mar 2000 21:58:30 -0500 (EST) (envelope-from robert@cyrus.watson.org) Date: Wed, 8 Mar 2000 21:58:30 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org Reply-To: Robert Watson To: Boris Staeblow , jkh@freebsd.org Cc: Luigi Rizzo , freebsd-current@freebsd.org Subject: Re: bridging broken in -current AND -stable In-Reply-To: <20000309000454.A37304@dva.in-berlin.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 =20 +#include "opt_bdg.h" +#ifdef BRIDGE=20 +#include +#endif + #include /* for vtophys */ #include /* for vtophys */ #include /* 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