From owner-cvs-all Thu Mar 15 17:15:17 2001 Delivered-To: cvs-all@freebsd.org Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by hub.freebsd.org (Postfix) with ESMTP id 19DFB37B718; Thu, 15 Mar 2001 17:15:11 -0800 (PST) (envelope-from archie@dellroad.org) Received: from curve.dellroad.org (curve.dellroad.org [10.1.1.30]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id RAA40812; Thu, 15 Mar 2001 17:12:44 -0800 (PST) Received: (from archie@localhost) by curve.dellroad.org (8.11.2/8.11.2) id f2G2Enf66954; Thu, 15 Mar 2001 18:14:49 -0800 (PST) (envelope-from archie) From: Archie Cobbs Message-Id: <200103160214.f2G2Enf66954@curve.dellroad.org> Subject: Re: cvs commit: src/sys/net if_ethersubr.c In-Reply-To: <200103132200.f2DM0Xc88870@freefall.freebsd.org> "from Luigi Rizzo at Mar 13, 2001 02:00:33 pm" To: Luigi Rizzo Date: Thu, 15 Mar 2001 18:14:49 -0800 (PST) Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Luigi Rizzo writes: > Modified files: (Branch: RELENG_4) > sys/net if_ethersubr.c > Log: > Fix breakage in bridging introduced in 1.70.2.13: > when doing bridging, we want to receive packets from all > interfaces in the same cluster, so the MAC address check > does not apply (it is already done in the bridging functions). > > May I ask, for the future, a bit more thinking to the side effects > of your changes before committing them ??? Sorry, I didn't realize anything besides ng_ether(4) used ether_demux(). The original intent of ether_demux() was to "send the Ethernet frame for processing to the upper layers". Presumably it's a normal function for the upper layers to do the filtering out of packets that shouldn't have arrived but did because of IFF_PROMISC... ? Turning on promisc. mode is really "breaking" your Ethernet interface and that breakage has to be "unbroken" at some level. Seems like ether_demux() is the correct place to do it, but maybe not. An alternative solution one could have taken is the one that ng_ether(4) takes, which is to set the destination Ethernet to be that of the interface before sending it upward. This keeps any bridging completely transparent to the upper layers (thus negating the need for any #if BRIDGE in "upper layer" code). -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message