aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/bridge_loop_avoidance.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-06-28batman-adv: Prefix main defines with BATADV_Sven Eckelmann1-9/+11
Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
2012-06-28batman-adv: Prefix bridge_loop_avoidance defines with BATADV_Sven Eckelmann1-2/+2
Reported-by: Martin Hundebøll <martin@hundeboll.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
2012-06-25batman-adv: Prefix bridge_loop_avoidance local static functions with batadv_Sven Eckelmann1-152/+168
All non-static symbols of batman-adv were prefixed with batadv_ to avoid collisions with other symbols of the kernel. Other symbols of batman-adv should use the same prefix to keep the naming scheme consistent. Signed-off-by: Sven Eckelmann <sven@narfation.org>
2012-06-25batman-adv: Prefix main static inline functions with batadv_Sven Eckelmann1-81/+84
All non-static symbols of batman-adv were prefixed with batadv_ to avoid collisions with other symbols of the kernel. Other symbols of batman-adv should use the same prefix to keep the naming scheme consistent. Signed-off-by: Sven Eckelmann <sven@narfation.org>
2012-06-24batman-adv: Prefix originator static inline functions with batadv_Sven Eckelmann1-2/+2
All non-static symbols of batman-adv were prefixed with batadv_ to avoid collisions with other symbols of the kernel. Other symbols of batman-adv should use the same prefix to keep the naming scheme consistent. Signed-off-by: Sven Eckelmann <sven@narfation.org>
2012-06-24batman-adv: Prefix hash static inline functions with batadv_Sven Eckelmann1-5/+8
All non-static symbols of batman-adv were prefixed with batadv_ to avoid collisions with other symbols of the kernel. Other symbols of batman-adv should use the same prefix to keep the naming scheme consistent. Signed-off-by: Sven Eckelmann <sven@narfation.org>
2012-06-24batman-adv: Prefix hard-interface static inline functions with batadv_Sven Eckelmann1-14/+14
All non-static symbols of batman-adv were prefixed with batadv_ to avoid collisions with other symbols of the kernel. Other symbols of batman-adv should use the same prefix to keep the naming scheme consistent. Signed-off-by: Sven Eckelmann <sven@narfation.org>
2012-06-20batman-adv: Reformat multiline comments to consistent styleSven Eckelmann1-48/+19
batman-adv doesn't follow the style for multiline comments that David S. Miller prefers. All comments should be reformatted to follow this consistent style to make the code slightly more readable. Signed-off-by: Sven Eckelmann <sven@narfation.org>
2012-06-20batman-adv: Prefix main non-static functions with batadv_Sven Eckelmann1-1/+1
batman-adv can be compiled as part of the kernel instead of an module. In that case the linker will see all non-static symbols of batman-adv and all other non-static symbols of the kernel. This could lead to symbol collisions. A prefix for the batman-adv symbols that defines their private namespace avoids such a problem. Reported-by: David Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
2012-06-20batman-adv: Prefix translation-table non-static functions with batadv_Sven Eckelmann1-2/+2
batman-adv can be compiled as part of the kernel instead of an module. In that case the linker will see all non-static symbols of batman-adv and all other non-static symbols of the kernel. This could lead to symbol collisions. A prefix for the batman-adv symbols that defines their private namespace avoids such a problem. Reported-by: David Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
2012-06-20batman-adv: Prefix originator non-static functions with batadv_Sven Eckelmann1-2/+2
batman-adv can be compiled as part of the kernel instead of an module. In that case the linker will see all non-static symbols of batman-adv and all other non-static symbols of the kernel. This could lead to symbol collisions. A prefix for the batman-adv symbols that defines their private namespace avoids such a problem. Reported-by: David Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
2012-06-20batman-adv: Prefix hash non-static functions with batadv_Sven Eckelmann1-4/+4
batman-adv can be compiled as part of the kernel instead of an module. In that case the linker will see all non-static symbols of batman-adv and all other non-static symbols of the kernel. This could lead to symbol collisions. A prefix for the batman-adv symbols that defines their private namespace avoids such a problem. Reported-by: David Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
2012-06-20batman-adv: Prefix bridge_loop_avoidance non-static functions with batadv_Sven Eckelmann1-14/+14
batman-adv can be compiled as part of the kernel instead of an module. In that case the linker will see all non-static symbols of batman-adv and all other non-static symbols of the kernel. This could lead to symbol collisions. A prefix for the batman-adv symbols that defines their private namespace avoids such a problem. Reported-by: David Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
2012-06-18batman-adv: Return error codes instead of -1 on failuresSven Eckelmann1-3/+3
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2012-06-18batman-adv: trivial endianness annotationsAl Viro1-3/+3
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Sven Eckelmann <sven@narfation.org>
2012-06-18batman-adv: get rid of pointless cast in memcpy()Al Viro1-1/+1
memcpy() arguments are void *, precisely to avoid that kind of pointless casts. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Sven Eckelmann <sven@narfation.org>
2012-06-18batman-adv: Initialize lockdep class keys for hashesSven Eckelmann1-0/+13
The hash for claim and backbone hash in the bridge loop avoidance code receive the same key because they are getting initialized by hash_new with the same key. Lockdep will create a backtrace when they are used recursively. This can be avoided by reinitializing the key directly after the hash_new. Signed-off-by: Sven Eckelmann <sven@narfation.org>
2012-05-11batman-adv: update copyright yearsAntonio Quartulli1-1/+1
update copyright years in order to include 2012 Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-18batman-adv: use ETH_HLEN instead of sizeof(struct ethhdr)Antonio Quartulli1-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>
2012-04-18batman-adv: remove duplicated line in commentAntonio Quartulli1-1/+0
Remove an accidentally added duplicated line in a function comment Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11batman-adv: form groups in the bridge loop avoidanceSimon Wunderlich1-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>
2012-04-11batman-adv: add broadcast duplicate checkSimon Wunderlich1-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>
2012-04-11batman-adv: don't let backbone gateways exchange tt entriesSimon Wunderlich1-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>
2012-04-11batman-adv: export claim tables through debugfsSimon Wunderlich1-0/+53
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11batman-adv: add basic bridge loop avoidance codeSimon Wunderlich1-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>