summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/bridge_loop_avoidance.c
Commit message (Collapse)AuthorAgeFilesLines
* batman-adv: update copyright yearsAntonio Quartulli2012-05-111-1/+1
| | | | | | update copyright years in order to include 2012 Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: use ETH_HLEN instead of sizeof(struct ethhdr)Antonio Quartulli2012-04-181-6/+4
| | | | | | | | Instead of using sizeof(struct ethhdr) it is strongly recommended to use the kernel macro ETH_HLEN. This patch substitute each occurrence of the former expressione with the latter one. Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: remove duplicated line in commentAntonio Quartulli2012-04-181-1/+0
| | | | | | Remove an accidentally added duplicated line in a function comment Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: form groups in the bridge loop avoidanceSimon Wunderlich2012-04-111-6/+115
| | | | | | | | | | | backbone gateways may be part of the same LAN, but participate in different meshes. With this patch, backbone gateways form groups by applying the groupid of another backbone gateway if it is higher. After forming the group, they only accept messages from backbone gateways of the same group. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: add broadcast duplicate checkSimon Wunderlich2012-04-111-0/+75
| | | | | | | | | | | When multiple backbone gateways relay the same broadcast from the backbone into the mesh, other nodes in the mesh may receive this broadcast multiple times. To avoid this, the crc checksums of received broadcasts are recorded and new broadcast packets with the same content may be dropped if received by another gateway. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: don't let backbone gateways exchange tt entriesSimon Wunderlich2012-04-111-0/+50
| | | | | | | | As the backbone gateways are connected to the same backbone, they should announce the same clients on the backbone non-exclusively. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: export claim tables through debugfsSimon Wunderlich2012-04-111-0/+53
| | | | | Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* batman-adv: add basic bridge loop avoidance codeSimon Wunderlich2012-04-111-0/+1296
This second version of the bridge loop avoidance for batman-adv avoids loops between the mesh and a backbone (usually a LAN). By connecting multiple batman-adv mesh nodes to the same ethernet segment a loop can be created when the soft-interface is bridged into that ethernet segment. A simple visualization of the loop involving the most common case - a LAN as ethernet segment: node1 <-- LAN --> node2 | | wifi <-- mesh --> wifi Packets from the LAN (e.g. ARP broadcasts) will circle forever from node1 or node2 over the mesh back into the LAN. With this patch, batman recognizes backbone gateways, nodes which are part of the mesh and backbone/LAN at the same time. Each backbone gateway "claims" clients from within the mesh to handle them exclusively. By restricting that only responsible backbone gateways may handle their claimed clients traffic, loops are effectively avoided. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>