From 17071578888c7c18709e48e74fae228c04581b9a Mon Sep 17 00:00:00 2001 From: Antonio Quartulli Date: Mon, 7 Nov 2011 16:36:40 +0100 Subject: 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 Signed-off-by: Antonio Quartulli Signed-off-by: Simon Wunderlich Tested-by: Alexey Fisher Signed-off-by: Marek Lindner --- net/batman-adv/originator.c | 1 + 1 file changed, 1 insertion(+) (limited to 'net/batman-adv/originator.c') diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c index 0bc2045a2f2e..847ff7e98a61 100644 --- a/net/batman-adv/originator.c +++ b/net/batman-adv/originator.c @@ -219,6 +219,7 @@ struct orig_node *get_orig_node(struct bat_priv *bat_priv, const uint8_t *addr) /* extra reference for return */ atomic_set(&orig_node->refcount, 2); + orig_node->tt_initialised = false; orig_node->tt_poss_change = false; orig_node->bat_priv = bat_priv; memcpy(orig_node->orig, addr, ETH_ALEN); -- cgit v1.2.3