bridge and ng_ether deja vu

Gleb Smirnoff glebius at FreeBSD.org
Wed Oct 5 04:49:09 PDT 2005


  Andrew, Max,

  exactly after one year I see if_bridge(4) having the same problem
with ng_ether(4) as old bridge(4) had. The problem is that packets
flowed thru ng_ether miss bridge processing. The problem is explained
well in this mail:

http://lists.freebsd.org/mailman/htdig/freebsd-net/2004-May/003881.html

It applies to if_bridge, too.

There was two ways to fix the problem:

1) Split ether_input() into ether_input()+ether_input_frame(), like
   to ether_output is split. In this case ether_input() must end up
   with ng_ether call and ether_input_frame(). ether_input_frame()
   does all bridge(4) processing and calls ether_demux().
   ng_ether_rcv_upper() simply calls ether_input_frame().

2) Copy and paste the bridge processing into ng_ether_rcv_upper().

We (me, sam, andre) have choosed the second way:

http://lists.freebsd.org/pipermail/cvs-src/2004-October/033496.html

However, I have cut all the bridge stuff from if_ethersubr.c and moved
it into bridge.c. This is how it looked like:

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/net/if_ethersubr.c.diff?r1=1.178&r2=1.179&f=h

Now I notice the same problem with if_bridge. And I decided to go second way
again, but noticed that unfortunately I again have to copy and paste > 20 lines
from if_ethersubr.c to ng_ether.c.

So, the question is: is it possible to push the block about ETHER_IS_MULTICAST
into bridge_input()? This will make copy and paste region smaller.

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE


More information about the freebsd-net mailing list