On September 26, 2010 14:57:56 Marek Lindner wrote:
By connecting multiple batman-adv mesh nodes to the same LAN network an ethernet loop can be created when the soft-interface is bridged with the LAN interface. A simple visualization of the loop:
node1 <-- LAN --> node2 | | wifi <-- mesh --> wifi
This patch adds the functionality to detect other batman-adv nodes connected to the LAN and select a 'gateway' to talk to the non-batman-adv devices on this LAN. All traffic from and to the mesh will be handled by this gateway to avoid the loop. OGMs received via the soft-interface are interpreted as 'port announcements' to locate potential batman-adv nodes. The patch can also deal with vlans on top of batX and offers a list of LAN neighbors via debugfs.
Not meaning to "joggle your elbow" on this, and only for my own information and education, I wonder if you could tell me why this approach was selected?
ISTM that, for this sort of loop, node1 <-- LAN --> node2 | | wifi1 <-- mesh --> wifi2 you are trying to prevent OGMs from perpetually circulating around. Wouldn't "wifi1" be able to recognize it's own OGMs? If so, then why wouldn't it just drop them, rather than passing them along to the next node?
If each wifi dropped it's own OGMs, then OGMs would only "circulate" once through the loop, and be discarded when they arrive back at their originating node.
Obviously, I don't understand enough about batman and batman-adv to be critical of the design; I'm simply trying to understand how the design works, and why you chose the "gateway" approach to eliminate routing loops.
Thanks