]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
batman-adv: unset the TT_CLIENT_PENDING flag if the new local entry already exists
authorAntonio Quartulli <ordex@autistici.org>
Sun, 15 Jan 2012 23:36:58 +0000 (00:36 +0100)
committerAntonio Quartulli <ordex@autistici.org>
Mon, 14 May 2012 07:05:08 +0000 (09:05 +0200)
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>
net/batman-adv/translation-table.c

index b3fb597c79b50341ab6754c75002ee2a70cd9612..a66c2dcd108800e16f0280f5f42537c9f12d2699 100644 (file)
@@ -206,6 +206,8 @@ void tt_local_add(struct net_device *soft_iface, const uint8_t *addr,
 
        if (tt_local_entry) {
                tt_local_entry->last_seen = jiffies;
+               /* possibly unset the TT_CLIENT_PENDING flag */
+               tt_local_entry->common.flags &= ~TT_CLIENT_PENDING;
                goto out;
        }