summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/bridge_loop_avoidance.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | batman-adv: Prefix originator non-static functions with batadv_Sven Eckelmann2012-06-201-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>
* | batman-adv: Prefix hash non-static functions with batadv_Sven Eckelmann2012-06-201-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>
* | batman-adv: Prefix bridge_loop_avoidance non-static functions with batadv_Sven Eckelmann2012-06-201-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>
* | batman-adv: Return error codes instead of -1 on failuresSven Eckelmann2012-06-181-3/+3
| | | | | | | | Signed-off-by: Sven Eckelmann <sven@narfation.org>
* | batman-adv: trivial endianness annotationsAl Viro2012-06-181-3/+3
| | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* | batman-adv: get rid of pointless cast in memcpy()Al Viro2012-06-181-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>
* | batman-adv: Initialize lockdep class keys for hashesSven Eckelmann2012-06-181-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>
* 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>
OpenPOWER on IntegriCloud