Date: Wed, 5 Oct 2005 15:49:05 +0400 From: Gleb Smirnoff <glebius@FreeBSD.org> To: thompsa@FreeBSD.org, mlaier@FreeBSD.org Cc: net@FreeBSD.org Subject: bridge and ng_ether deja vu Message-ID: <20051005114905.GB4291@cell.sick.ru>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051005114905.GB4291>