From patchwork Thu Jul 7 22:33:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Lindner X-Patchwork-Id: 1247 Return-Path: Received: from nm11.bullet.mail.ukl.yahoo.com (nm11.bullet.mail.ukl.yahoo.com [217.146.183.185]) by open-mesh.org (Postfix) with SMTP id 9CC211542DF for ; Fri, 8 Jul 2011 00:34:00 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@yahoo.de; dkim-adsp=none Received: from [217.146.183.208] by nm11.bullet.mail.ukl.yahoo.com with NNFMP; 07 Jul 2011 22:34:00 -0000 Received: from [77.238.184.64] by tm1.bullet.mail.ukl.yahoo.com with NNFMP; 07 Jul 2011 22:34:00 -0000 Received: from [127.0.0.1] by smtp133.mail.ukl.yahoo.com with NNFMP; 07 Jul 2011 22:34:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s1024; t=1310078040; bh=OpuXknp9TFvfG0UcQTkJoHLMx/GyG3M8/CrUxJY22IA=; h=X-Yahoo-Newman-Id:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References; b=BIptS8P6+EjcK6Qcvm0PFs0jdgGpY3A7f8cEEMt6avdMIZTofu2qaCawaGmNUlLlM2/HefV64BfBj/LQo0ijACRknbTkUvIkFdeTplddO+XRlrZcD4Hj+u0//M3UbydZBzAIm1sC2fEscPu+aHaWmObIetkVXoNmo+XOYUuuSIE= X-Yahoo-Newman-Id: 202543.98042.bm@smtp133.mail.ukl.yahoo.com Received: from localhost (lindner_marek@90.61.212.109 with plain) by smtp133.mail.ukl.yahoo.com with SMTP; 07 Jul 2011 22:33:59 +0000 GMT X-Yahoo-SMTP: tW.h3tiswBBMXO2coYcbPigGD5Lt6zY_.Zc- X-YMail-OSG: p5maYhwVM1mKtJ_3tqXRMHKMOOOdLcpEfVpxlIlsvtQF1gs ZdD2ND80xzme43XSjMvGv3d7fngz09lDtPm50zU5vp.UnVobGb_wrnpzT7s. CwlCg2b_VgApJX50DGtOiDmPioAUSD3I3Ewy4SnX0atTtUNOWxtPACeZRbNn LcaW0P6h0OXRdbPkp_ykdFe7vl0gw0UkJeNupNBLWyhsGvAPpZ2aEtv78Vc2 s4at_ddysbw_3ijryPrjQoA2UlC0tyqYf3XUvdehCzBtmmxwza2wTzyW7foL bicilLE0kcLWsErzsNq.5YVkyLyXqPs1g7tB0MUs.QeSy8V45tiBGz44KBlH P X-Yahoo-Newman-Property: ymail-3 From: Marek Lindner To: davem@davemloft.net Date: Fri, 8 Jul 2011 00:33:40 +0200 Message-Id: <1310078023-28958-2-git-send-email-lindner_marek@yahoo.de> X-Mailer: git-send-email 1.7.5.3 In-Reply-To: <1310078023-28958-1-git-send-email-lindner_marek@yahoo.de> References: <1310078023-28958-1-git-send-email-lindner_marek@yahoo.de> Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org, Marek Lindner Subject: [B.A.T.M.A.N.] [PATCH 1/4] batman-adv: initialise last_ttvn and tt_crc for the orig_node structure 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 22:34:00 -0000 From: Antonio Quartulli The last_ttvn and tt_crc fields of the orig_node structure were not initialised causing an immediate TT_REQ/RES dialogue even if not needed. Signed-off-by: Antonio Quartulli Signed-off-by: Marek Lindner --- net/batman-adv/originator.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c index 4cc94d4..f3c3f62 100644 --- a/net/batman-adv/originator.c +++ b/net/batman-adv/originator.c @@ -223,6 +223,8 @@ struct orig_node *get_orig_node(struct bat_priv *bat_priv, const uint8_t *addr) orig_node->bat_priv = bat_priv; memcpy(orig_node->orig, addr, ETH_ALEN); orig_node->router = NULL; + orig_node->tt_crc = 0; + atomic_set(&orig_node->last_ttvn, 0); orig_node->tt_buff = NULL; orig_node->tt_buff_len = 0; atomic_set(&orig_node->tt_size, 0);