batman-adv: fix tt_local_reset_flags() function
Commit Message
tt_local_num has to be increased only the when flag passed as argument is reset
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
This patch should fix the aforementioned bug. Please the testers to give it a
try :-) We are waiting for feedbacks!
translation-table.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
@@ -1723,6 +1723,8 @@ static void tt_local_reset_flags(struct bat_priv *bat_priv, uint16_t flags)
rcu_read_lock();
hlist_for_each_entry_rcu(tt_local_entry, node,
head, hash_entry) {
+ if (!(tt_local_entry->flags & flags))
+ continue;
tt_local_entry->flags &= ~flags;
atomic_inc(&bat_priv->num_local_tt);
}