From patchwork Wed Jul 6 23:40:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1211 Return-Path: Received: from confino.investici.org (investici.nine.ch [217.150.252.179]) by open-mesh.org (Postfix) with ESMTPS id 09BAD154412 for ; Thu, 7 Jul 2011 01:41:37 +0200 (CEST) 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 32218C8652; Wed, 6 Jul 2011 23:41:36 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 confino.investici.org 32218C8652 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1309995696; bh=sBu6lg03YzbiRcowOTrFZgKliapQ8oHMAW7Fo4LleCo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=oDVnB1/7zSc947pi8G0N1PZ4czWVQgAv87KbUMYLwtHIIXBtFCe/3LEbTJyZ3H12F YJAwiwARMltDcgQ7F/u0z5v3oKSoRc1S0op4yPYYtc+X3Egx1j2lf8A0meTGFA01Ln T+lFkxvb4ghzPyXSA3Ll1yVAk1+mw8Gl22HcbL3I= From: Antonio Quartulli To: "B.A.T.M.A.N" Date: Thu, 7 Jul 2011 01:40:57 +0200 Message-Id: <1309995659-19126-2-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1309995659-19126-1-git-send-email-ordex@autistici.org> References: <1309995659-19126-1-git-send-email-ordex@autistici.org> Subject: [B.A.T.M.A.N.] [PATCHv2 1/3] 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: Wed, 06 Jul 2011 23:41:37 -0000 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 --- originator.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/originator.c b/originator.c index 338b3c5..4aa115f 100644 --- a/originator.c +++ b/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);