From patchwork Wed Jul 6 23:28:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1228 Return-Path: Received: from contumacia.investici.org (contumacia.investici.org [178.255.144.35]) by open-mesh.org (Postfix) with ESMTPS id 22235154401 for ; Thu, 7 Jul 2011 01:29:29 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@autistici.org; dkim-adsp=pass Received: from [178.255.144.35] (contumacia [178.255.144.35]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id EBDD9E8130; Wed, 6 Jul 2011 23:29:27 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 contumacia.investici.org EBDD9E8130 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1309994968; bh=sBu6lg03YzbiRcowOTrFZgKliapQ8oHMAW7Fo4LleCo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=HlExichfvYKtf5W/h0v3xyFss6xDqpNDj4ljTskV+75rHoYVkIWQlYtFoGNC+FKWr uos9UfiSoXPumJjxwFPAVWpSkfK/10tZeZ3D0f28L2aG/hTTEP2eC0lrveQU6eY044 YQOvn58jvVN/WxA0vW/BKSTX+RN5gz7zY6ak73cc= From: Antonio Quartulli To: "B.A.T.M.A.N" Date: Thu, 7 Jul 2011 01:28:43 +0200 Message-Id: <1309994925-10165-2-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1309879385-21224-1-git-send-email-ordex@autistici.org> References: <1309879385-21224-1-git-send-email-ordex@autistici.org> Subject: [B.A.T.M.A.N.] [PATCH 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:29:29 -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);