Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Mar 2001 18:14:49 -0800 (PST)
From:      Archie Cobbs <archie@dellroad.org>
To:        Luigi Rizzo <luigi@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/net if_ethersubr.c
Message-ID:  <200103160214.f2G2Enf66954@curve.dellroad.org>
In-Reply-To: <200103132200.f2DM0Xc88870@freefall.freebsd.org> "from Luigi Rizzo at Mar 13, 2001 02:00:33 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103160214.f2G2Enf66954>