b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Antonio Quartulli <ordex@autistici.org>
To: "B.A.T.M.A.N" <b.a.t.m.a.n@lists.open-mesh.org>
Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: send_*_tt_response() has to initialise the ttl field
Date: Sun, 29 May 2011 20:54:31 +0200	[thread overview]
Message-ID: <1306695271-8749-1-git-send-email-ordex@autistici.org> (raw)

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 <ordex@autistici.org>
---
 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);
-- 
1.7.3.4


             reply	other threads:[~2011-05-29 18:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-29 18:54 Antonio Quartulli [this message]
2011-05-29 19:58 ` [B.A.T.M.A.N.] [PATCH] batman-adv: send_*_tt_response() has to initialise the ttl field Marek Lindner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1306695271-8749-1-git-send-email-ordex@autistici.org \
    --to=ordex@autistici.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).