From patchwork Thu Jul 7 13:25:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1220 Return-Path: Received: from confino.investici.org (investici.nine.ch [217.150.252.179]) by open-mesh.org (Postfix) with ESMTPS id 0DB041542DF for ; Thu, 7 Jul 2011 15:25:53 +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 52AB3C865D; Thu, 7 Jul 2011 13:25:52 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 confino.investici.org 52AB3C865D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1310045152; bh=vAq06MofD56bXdoiSbODW4b3nvVD88iUK5/lmyraNHE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=J2DrybGEn3J8XXQnzRbUS9vGrBfLCZdQ/dw5G77xhTZR4Pgi88QglEOEsPl/QkY3A TpH+9YLoQt0hISvq6eBFqDvGCcDpjGBka8RELIJEg5ntgFJOBJIagf78mPmyDBe0tq sUupzcSGDY7G5I0S5Q6VmxMJgO1uWfezueL3tzPA= From: Antonio Quartulli To: "B.A.T.M.A.N" Date: Thu, 7 Jul 2011 15:25:03 +0200 Message-Id: <1310045106-23202-2-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1310045106-23202-1-git-send-email-ordex@autistici.org> References: <1310045106-23202-1-git-send-email-ordex@autistici.org> Subject: [B.A.T.M.A.N.] [PATCHv3 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 13:25:53 -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 4cc94d4..f3c3f62 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);