From patchwork Thu Jul 7 09:30:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1209 Return-Path: Received: from latitanza.investici.org (latitanza.investici.org [82.94.249.234]) by open-mesh.org (Postfix) with ESMTPS id A81381542DF for ; Thu, 7 Jul 2011 11:31:10 +0200 (CEST) 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 B976398053; Thu, 7 Jul 2011 09:31:09 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 latitanza.investici.org B976398053 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1310031070; bh=YPfh8iMcsCENVBei9MALkGy3Sw6MGAIRzIENd4ZP0LI=; h=From:To:Cc:Subject:Date:Message-Id; b=tTOEpxxW4Nw+nm5KgQoyCyA8Us7njuSSeV2b3665qUY8bQeiD2TpCLop+BxcAr/d6 BbdPjejNje8cxl18V5j2zjqEjlBaIc5W4JYyMHetgQTSdpPVM9zZ44Jd33AvaxSY5/ P99bByEtXSvqKnR6UIpeo8dyn546bPikQG1lNmd0= From: Antonio Quartulli To: "B.A.T.M.A.N" Date: Thu, 7 Jul 2011 11:30:27 +0200 Message-Id: <1310031027-7198-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: request the full table if tt_crc doesn't match 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: Thu, 07 Jul 2011 09:31:10 -0000 In case of tt_crc mismatching for a certain orig_node after applying the changes, the node must request the full table immediately. Signed-off-by: Antonio Quartulli --- routing.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/routing.c b/routing.c index 2cb98be..010ebb7 100644 --- a/routing.c +++ b/routing.c @@ -91,6 +91,11 @@ static void update_transtable(struct bat_priv *bat_priv, * to recompute it to spot any possible inconsistency * in the global table */ orig_node->tt_crc = tt_global_crc(bat_priv, orig_node); + + /* If something went wrong we must request the full table now */ + if (orig_node->tt_crc != tt_crc) + goto request_table; + /* Roaming phase is over: tables are in sync again. I can * unset the flag */ orig_node->tt_poss_change = false;