aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/main.h
diff options
context:
space:
mode:
authorSimon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>2012-01-22 14:00:19 -0500
committerAntonio Quartulli <ordex@autistici.org>2012-04-11 08:28:58 -0400
commit23721387c409087fd3b97e274f34d3ddc0970b74 (patch)
treecf386c6f169a1b2b6e8c8ef77be5226e10046689 /net/batman-adv/main.h
parenta7f6ee9493677ba40625d810258de5bd521cc1b0 (diff)
batman-adv: add basic bridge loop avoidance code
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>
Diffstat (limited to 'net/batman-adv/main.h')
-rw-r--r--net/batman-adv/main.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h
index 7a6a25f22fc2..82723b5dce61 100644
--- a/net/batman-adv/main.h
+++ b/net/batman-adv/main.h
@@ -80,6 +80,9 @@
80#define MAX_AGGREGATION_BYTES 512 80#define MAX_AGGREGATION_BYTES 512
81#define MAX_AGGREGATION_MS 100 81#define MAX_AGGREGATION_MS 100
82 82
83#define BLA_PERIOD_LENGTH 10000 /* 10 seconds */
84#define BLA_BACKBONE_TIMEOUT (BLA_PERIOD_LENGTH * 3)
85#define BLA_CLAIM_TIMEOUT (BLA_PERIOD_LENGTH * 10)
83/* don't reset again within 30 seconds */ 86/* don't reset again within 30 seconds */
84#define RESET_PROTECTION_MS 30000 87#define RESET_PROTECTION_MS 30000
85#define EXPECTED_SEQNO_RANGE 65536 88#define EXPECTED_SEQNO_RANGE 65536
@@ -117,7 +120,8 @@ enum dbg_level {
117 DBG_BATMAN = 1 << 0, 120 DBG_BATMAN = 1 << 0,
118 DBG_ROUTES = 1 << 1, /* route added / changed / deleted */ 121 DBG_ROUTES = 1 << 1, /* route added / changed / deleted */
119 DBG_TT = 1 << 2, /* translation table operations */ 122 DBG_TT = 1 << 2, /* translation table operations */
120 DBG_ALL = 7 123 DBG_BLA = 1 << 3, /* bridge loop avoidance */
124 DBG_ALL = 15
121}; 125};
122 126
123/* Kernel headers */ 127/* Kernel headers */