From patchwork Sun Jan 22 18:40:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 1454 Return-Path: Received: from nick.hrz.tu-chemnitz.de (nick.hrz.tu-chemnitz.de [134.109.228.11]) by open-mesh.org (Postfix) with ESMTPS id 1A6D0600811 for ; Sun, 22 Jan 2012 19:40:40 +0100 (CET) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@tu-chemnitz.de; dkim-adsp=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tu-chemnitz.de; s=dkim2010; h=References:In-Reply-To:Message-Id:Date:Subject:To:From; bh=KSYp1tOP6f1/7IK+BQsooq0EcLgjUIjOfp6NHyy0RLo=; b=T4/za9uEDDahHt16vhc5VBDo4btBoGnLKqN5zWHe4oaLD0bJbp7LBGNS0KkY6yhE4JhSx4DKitlTLCvH3iZHCT65Y1M0qzJrSrswY9IWW1+P3GtE1icq+etEnsM5QJ8AmR+EuaBt5K2y/rEssMsvNk0OF9Tb7m1n2sRGkvoy88A=; Received: from p57aa022b.dip0.t-ipconnect.de ([87.170.2.43] helo=pandem0nium) by nick.hrz.tu-chemnitz.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1Rp2LH-00048C-9q; Sun, 22 Jan 2012 19:40:39 +0100 Received: from dotslash by pandem0nium with local (Exim 4.72) (envelope-from ) id 1Rp2LI-0003Wn-F9; Sun, 22 Jan 2012 19:40:40 +0100 From: Simon Wunderlich To: b.a.t.m.a.n@lists.open-mesh.org, Antonio Quartulli Date: Sun, 22 Jan 2012 19:40:40 +0100 Message-Id: <1327257640-13530-1-git-send-email-siwu@hrz.tu-chemnitz.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <201201230026.09036.lindner_marek@yahoo.de> References: <201201230026.09036.lindner_marek@yahoo.de> X-RBL-Warning: 87.170.2.43 is listed at zen.spamhaus.org X-Scan-AV: nick.hrz.tu-chemnitz.de; 2012-01-22 19:40:39; 6049cea363d8a2e023058d7de0088613 X-Scan-SA: nick.hrz.tu-chemnitz.de; 2012-01-22 19:40:39; 9da3011ce67d470712f26b1b7d444d4a X-Spam-Score: 1.5 (+) X-Spam-Report: --- Textanalyse SpamAssassin 3.3.1 (1.5 Punkte) Fragen an/questions to: Postmaster TU Chemnitz * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 2.5 TUC_RBL RBL: Mail von bekanntem Spam-Relay oder Dialup (TUC) --- Ende Textanalyse Subject: [B.A.T.M.A.N.] [PATCHv2] batman-adv: fix initialised flag for tt request/responses 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, 22 Jan 2012 18:40:40 -0000 When receiving a tt_response, we first delete the old entries and set the initialised flag to false, then add the new received entries, but forgot to set the initialised flag to true again. This may lead to endless loops of requests/responses, as a request is always issued if the initialised flag is not set. This is a regression introduced by 8ef201e01c57e3bfbcb7f6db69405ff259c2b907. Fix this by moving initialised = true from tt_update_changes() to _tt_update_changes(). Signed-off-by: Simon Wunderlich --- translation-table.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/translation-table.c b/translation-table.c index 27753a0..9a6f315 100644 --- a/translation-table.c +++ b/translation-table.c @@ -1434,6 +1434,7 @@ static void _tt_update_changes(struct bat_priv *bat_priv, */ return; } + orig_node->tt_initialised = true; } static void tt_fill_gtable(struct bat_priv *bat_priv, @@ -1476,7 +1477,6 @@ static void tt_update_changes(struct bat_priv *bat_priv, tt_save_orig_buffer(bat_priv, orig_node, (unsigned char *)tt_change, tt_num_changes); atomic_set(&orig_node->last_ttvn, ttvn); - orig_node->tt_initialised = true; } bool is_my_client(struct bat_priv *bat_priv, const uint8_t *addr)