aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2011-07-07 08:24:34 -0400
committerMarek Lindner <lindner_marek@yahoo.de>2011-07-07 12:49:26 -0400
commita7f9becb7d27008af0f72f8449c110276b0df37d (patch)
tree37adcfef1cde149943e7412e983ac5eb5e7aeb97 /net
parent980d55b20a730cbabc74cdc57be9c47713dba57b (diff)
batman-adv: request the full table if tt_crc doesn't match
In case of tt_crc mismatching for a certain orig_node after applying the changes, the node must request the full table immediately. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net')
-rw-r--r--net/batman-adv/routing.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index 2cb98bed1586..0f32c818874d 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -91,6 +91,18 @@ static void update_transtable(struct bat_priv *bat_priv,
91 * to recompute it to spot any possible inconsistency 91 * to recompute it to spot any possible inconsistency
92 * in the global table */ 92 * in the global table */
93 orig_node->tt_crc = tt_global_crc(bat_priv, orig_node); 93 orig_node->tt_crc = tt_global_crc(bat_priv, orig_node);
94
95 /* The ttvn alone is not enough to guarantee consistency
96 * because a single value could repesent different states
97 * (due to the wrap around). Thus a node has to check whether
98 * the resulting table (after applying the changes) is still
99 * consistent or not. E.g. a node could disconnect while its
100 * ttvn is X and reconnect on ttvn = X + TTVN_MAX: in this case
101 * checking the CRC value is mandatory to detect the
102 * inconsistency */
103 if (orig_node->tt_crc != tt_crc)
104 goto request_table;
105
94 /* Roaming phase is over: tables are in sync again. I can 106 /* Roaming phase is over: tables are in sync again. I can
95 * unset the flag */ 107 * unset the flag */
96 orig_node->tt_poss_change = false; 108 orig_node->tt_poss_change = false;