Commit 521251f2f5fa16747cc21e71580e404af855d140

Authored by Antonio Quartulli
1 parent a77e8c61db

batman-adv: unset the TT_CLIENT_PENDING flag if the new local entry already exists

When trying to add a new tt_local_entry, if such entry already exists, we have
to ensure that the TT_CLIENT_PENDING flag is not set, otherwise the entry will
be deleted soon.

Reported-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

net/batman-adv/translation-table.c
... ... @@ -206,6 +206,8 @@
206 206  
207 207 if (tt_local_entry) {
208 208 tt_local_entry->last_seen = jiffies;
  209 + /* possibly unset the TT_CLIENT_PENDING flag */
  210 + tt_local_entry->common.flags &= ~TT_CLIENT_PENDING;
209 211 goto out;
210 212 }
211 213