Repository : ssh://git@open-mesh.org/batctl
On branch : master
commit b790a4abcd52a997b73df96df6c356de54354d1f Author: Simon Wunderlich simon.wunderlich@open-mesh.com Date: Sat Mar 12 10:49:33 2016 +0100
batctl: add detection for complex bridge loops
There are network setups where the current bridge loop avoidance can't detect bridge loops. The minimal setup affected would consist of two LANs and two separate meshes, connected in a ring like that:
A...(mesh1)...B | | (LAN1) (LAN2) | | C...(mesh2)...D
Since both the meshes and backbones are separate, the bridge loop avoidance has not enough information to detect and avoid the loop in this case. Even if these scenarios can't be fixed easily, these kind of loops can be detected.
This patch implements a periodic check (running every 60 seconds for now) which sends a broadcast frame with a random MAC address on each backbone VLAN. If a broadcast frame with the same MAC address is received shortly after on the mesh, we know that there must be a loop and report that incident as well as throw an uevent to let others handle that problem.
Signed-off-by: Simon Wunderlich simon.wunderlich@open-mesh.com [sven@narfation.org: fix conflicts with current version] Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
b790a4abcd52a997b73df96df6c356de54354d1f packet.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/packet.h b/packet.h index 0796dfd..372128d 100644 --- a/packet.h +++ b/packet.h @@ -175,6 +175,7 @@ enum batadv_bla_claimframe { BATADV_CLAIM_TYPE_UNCLAIM = 0x01, BATADV_CLAIM_TYPE_ANNOUNCE = 0x02, BATADV_CLAIM_TYPE_REQUEST = 0x03, + BATADV_CLAIM_TYPE_LOOPDETECT = 0x04, };
/**