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 1/3] batman-adv: initialise last_ttvn and tt_crc for the orig_node structure
Date: Thu,  7 Jul 2011 01:28:43 +0200	[thread overview]
Message-ID: <1309994925-10165-2-git-send-email-ordex@autistici.org> (raw)
In-Reply-To: <1309879385-21224-1-git-send-email-ordex@autistici.org>

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


  parent reply	other threads:[~2011-07-06 23:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05 15:22 [B.A.T.M.A.N.] [PATCH 0/6] Solve consistency issues in TT code Antonio Quartulli
2011-07-05 15:23 ` [B.A.T.M.A.N.] [PATCH 1/6] batman-adv: unify the three starting fields of the tt_local/global_entry structures Antonio Quartulli
2011-07-06  7:31   ` Sven Eckelmann
2011-07-06  7:43     ` Sven Eckelmann
2011-07-05 15:23 ` [B.A.T.M.A.N.] [PATCH 2/6] batman-adv: unify tt_local/global_free_ref functions Antonio Quartulli
2011-07-05 15:23 ` [B.A.T.M.A.N.] [PATCH 3/6] batman-adv: full table response must not contain not yet announced clients Antonio Quartulli
2011-07-05 15:23 ` [B.A.T.M.A.N.] [PATCH 4/6] batman-adv: mark local entry as PENDING in case of deletion Antonio Quartulli
2011-07-05 15:23 ` [B.A.T.M.A.N.] [PATCH 5/6] batman-adv: commit changes and clean the transtable on ttvn increment Antonio Quartulli
2011-07-05 15:23 ` [B.A.T.M.A.N.] [PATCH 6/6] batman-adv: global entries are marked as PENDING in case of roaming Antonio Quartulli
2011-07-06 23:28 ` [B.A.T.M.A.N.] [PATCHv2 0/3] Solve consistency issues in TT code Antonio Quartulli
2011-07-06 23:28 ` Antonio Quartulli [this message]
2011-07-06 23:28 ` [B.A.T.M.A.N.] [PATCH 2/3] batman-adv: keep local table consistency for further TT_RESPONSE Antonio Quartulli
2011-07-06 23:28 ` [B.A.T.M.A.N.] [PATCH 3/3] batman-adv: keep global table consistency in case of roaming Antonio Quartulli

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=1309994925-10165-2-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).