From: Antonio Quartulli Date: Sun, 15 Jan 2012 23:36:58 +0000 (+0100) Subject: batman-adv: unset the TT_CLIENT_PENDING flag if the new local entry already exists X-Git-Tag: v3.5-rc1~109^2~78^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=521251f2f5fa16747cc21e71580e404af855d140;p=profile%2Fcommon%2Fkernel-common.git 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 Signed-off-by: Antonio Quartulli --- diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index b3fb597..a66c2dc 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@ -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; }