From patchwork Sun May 29 18:54:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1089 Return-Path: Received: from confino.investici.org (investici.nine.ch [217.150.252.179]) by open-mesh.org (Postfix) with ESMTPS id B25F315443B for ; Sun, 29 May 2011 20:54:47 +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 B931DC865F; Sun, 29 May 2011 18:54:46 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 confino.investici.org B931DC865F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1306695286; bh=jlkH4oPIuHLIT5YL2IlayTdSU2ZP4zCQcGadksIV1bE=; h=From:To:Cc:Subject:Date:Message-Id; b=pwLhNNIAoBEkJ4cInb7ldp8Y0RCygHBQYp0NctCRuputemhdFYkJL+fhQcrHCHgBI IsC7nQ8pkHpvkJp6R9GwukSBkvIP/Y91NhFRIhkM9zZcFOzVO1kQFaPq9GCmAFqm2K 3KxFrwQLCXNOOZkTx85HxRc7Tl7svtMhSusiofHw= From: Antonio Quartulli To: "B.A.T.M.A.N" Date: Sun, 29 May 2011 20:54:31 +0200 Message-Id: <1306695271-8749-1-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.7.3.4 Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: send_*_tt_response() has to initialise the ttl field 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, 29 May 2011 18:54:47 -0000 send_*_tt_response() didn't properly initialise the ttl field of the tt_response message. This error was introduced with: cea194d90b11aff7fc289149e4c7f305fad3535a Signed-off-by: Antonio Quartulli --- translation-table.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/translation-table.c b/translation-table.c index f0d8857..f04ab9b 100644 --- a/translation-table.c +++ b/translation-table.c @@ -1132,6 +1132,7 @@ static bool send_other_tt_response(struct bat_priv *bat_priv, tt_response->packet_type = BAT_TT_QUERY; tt_response->version = COMPAT_VERSION; + tt_response->ttl = TTL; memcpy(tt_response->src, req_dst_orig_node->orig, ETH_ALEN); memcpy(tt_response->dst, tt_request->src, ETH_ALEN); tt_response->tt_data = htons(tt_tot); @@ -1280,6 +1281,7 @@ static bool send_my_tt_response(struct bat_priv *bat_priv, tt_response->packet_type = BAT_TT_QUERY; tt_response->version = COMPAT_VERSION; + tt_response->ttl = TTL; memcpy(tt_response->src, primary_if->net_dev->dev_addr, ETH_ALEN); memcpy(tt_response->dst, tt_request->src, ETH_ALEN); tt_response->tt_data = htons(tt_tot);