From patchwork Sat Dec 3 20:54:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1377 Return-Path: Received: from confino.investici.org (investici.nine.ch [217.150.252.179]) by open-mesh.org (Postfix) with ESMTPS id 1F8BE600777 for ; Sat, 3 Dec 2011 21:54:40 +0100 (CET) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@autistici.org; dkim-adsp=pass Received: from [217.150.252.179] (confino [217.150.252.179]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id 59470C8642; Sat, 3 Dec 2011 20:54:39 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 confino.investici.org 59470C8642 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1322945679; bh=RjhNYTJoN+O1YUGm4t/IZrab6lQBIiF0DXPbhTMs3LM=; h=From:To:Cc:Subject:Date:Message-Id; b=cSKVOjcAXkjteyGCmbd5nAj2mczcV0QAnNV8xjL2Nf75YJJleqfwrW4Apq5mA1KUV QMDA1bzYikpXW++ZxcGX2mJnv0XHtvIqje8BBZ3FvtAC6sAzF/mvVogXsDyoEqXiWj fdTyjFwNjVi7EpjjLunBZyzMHnjaxPeDWvtPffW8= From: Antonio Quartulli To: b.a.t.m.a.n@lists.open-mesh.org Date: Sat, 3 Dec 2011 21:54:18 +0100 Message-Id: <1322945658-25154-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: in case of roaming mark the client with TT_CLIENT_ROAM 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: Sat, 03 Dec 2011 20:54:40 -0000 Whenever we add a local client for which we already have a global entry, the latter has to be marked with the TT_CLIENT_ROAM flag (instead of TT_CLIENT_PENDING) Signed-off-by: Antonio Quartulli --- translation-table.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/translation-table.c b/translation-table.c index 7a7df4a..cf3e2c2 100644 --- a/translation-table.c +++ b/translation-table.c @@ -242,9 +242,11 @@ void tt_local_add(struct net_device *soft_iface, const uint8_t *addr, if (tt_global_entry) { /* This node is probably going to update its tt table */ tt_global_entry->orig_node->tt_poss_change = true; - /* The global entry has to be marked as PENDING and has to be + /* The global entry has to be marked as ROAMING and has to be * kept for consistency purpose */ - tt_global_entry->common.flags |= TT_CLIENT_PENDING; + tt_global_entry->common.flags |= TT_CLIENT_ROAM; + tt_global_entry->roam_at = jiffies; + send_roam_adv(bat_priv, tt_global_entry->common.addr, tt_global_entry->orig_node); }