bridge and ng_ether deja vu

Gleb Smirnoff glebius at
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:

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:

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

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.

More information about the freebsd-net mailing list