aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/types.h
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2011-11-07 16:36:40 +0100
committerMarek Lindner <lindner_marek@yahoo.de>2012-02-17 02:50:18 +0800
commit17071578888c7c18709e48e74fae228c04581b9a (patch)
treea2513bb57d5685db9cfeab65a3d9c645c0df5e7c /net/batman-adv/types.h
parentLinux 3.3-rc1 (diff)
downloadlinux-dev-17071578888c7c18709e48e74fae228c04581b9a.tar.xz
linux-dev-17071578888c7c18709e48e74fae228c04581b9a.zip
batman-adv: add tt_initialised flag to the orig_node struct
(ttvn == 0) is currently used as initial condition. However this is not a good idea because ttvn gets the vale zero each time after reaching the maximum value (wrap around). For this reason a new flag is added in order to define whether a node has an initialised table or not. Moreover, after invoking tt_global_del_orig(), tt_initialised has to be set to false Reported-by: Alexey Fisher <bug-track@fisher-privat.net> Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Tested-by: Alexey Fisher <bug-track@fisher-privat.net> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to '')
-rw-r--r--net/batman-adv/types.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
index e9eb043719ac..35085f410b96 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -81,6 +81,7 @@ struct orig_node {
int16_t tt_buff_len;
spinlock_t tt_buff_lock; /* protects tt_buff */
atomic_t tt_size;
+ bool tt_initialised;
/* The tt_poss_change flag is used to detect an ongoing roaming phase.
* If true, then I sent a Roaming_adv to this orig_node and I have to
* inspect every packet directed to it to check whether it is still