From patchwork Sun Jan 15 23:36:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1461 Return-Path: Received: from latitanza.investici.org (latitanza.investici.org [82.94.249.234]) by open-mesh.org (Postfix) with ESMTPS id 8BB3760072F for ; Mon, 16 Jan 2012 00:37:45 +0100 (CET) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@autistici.org; dkim-adsp=pass Received: from [82.94.249.234] (latitanza [82.94.249.234]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id 9667598394; Sun, 15 Jan 2012 23:37:44 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 latitanza.investici.org 9667598394 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1326670664; bh=HD1dfz1PqWma17PHdyTwora1FrYnJg1weijWLYNmW5E=; h=From:To:Cc:Subject:Date:Message-Id; b=EInjRwWCtmGLATbCQWi2u0c2SlR1jzMNczaAZZ3HKvQLawk4NooN9XonB+4RQzoy5 90Pmatjyh/NJkPkHrnDF3+4ntH5hQexMCe3sLAEn46kJ13+OQCG8NRK2WXRTTNsWbQ Q8mi232RyL6ZcJ5Wk0zj3rmjht+4Jh5ooqe2q1S0= From: Antonio Quartulli To: b.a.t.m.a.n@lists.open-mesh.org Date: Mon, 16 Jan 2012 00:36:58 +0100 Message-Id: <1326670618-3950-1-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.7.3.4 Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: unset the TT_CLIENT_PENDING flag if the new local entry already exists X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jan 2012 23:37:45 -0000 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 --- translation-table.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/translation-table.c b/translation-table.c index 27753a0..65de6b7 100644 --- a/translation-table.c +++ b/translation-table.c @@ -188,6 +188,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; }