batctl: keep local table consistency for further TT_RESPONSE

Message ID 1310161134-18515-1-git-send-email-ordex@autistici.org (mailing list archive)
State Accepted, archived
Commit 219bc397a27411c7ee4676af62680a4f5f03147a
Headers

Commit Message

Antonio Quartulli July 8, 2011, 9:38 p.m. UTC
  To keep transtable consistency among all the nodes, an originator must
not send not yet announced clients within a full table TT_RESPONSE.
Instead, deleted client have to be kept in the table in order to be sent
within an immediate TT_RESPONSE. In this way all the nodes in the
network will always provide the same response for the same request.

All the modification are committed at the next ttvn increment event.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
---
 packet.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
  

Comments

Marek Lindner July 8, 2011, 11:05 p.m. UTC | #1
On Friday, July 08, 2011 23:38:54 Antonio Quartulli wrote:
> To keep transtable consistency among all the nodes, an originator must
> not send not yet announced clients within a full table TT_RESPONSE.
> Instead, deleted client have to be kept in the table in order to be sent
> within an immediate TT_RESPONSE. In this way all the nodes in the
> network will always provide the same response for the same request.
> 
> All the modification are committed at the next ttvn increment event.

Applied in revision 219bc39.

Thanks,
Marek
  

Patch

diff --git a/packet.h b/packet.h
index 590e4a6..b76b4be 100644
--- a/packet.h
+++ b/packet.h
@@ -84,7 +84,9 @@  enum tt_query_flags {
 enum tt_client_flags {
 	TT_CLIENT_DEL     = 1 << 0,
 	TT_CLIENT_ROAM    = 1 << 1,
-	TT_CLIENT_NOPURGE = 1 << 8
+	TT_CLIENT_NOPURGE = 1 << 8,
+	TT_CLIENT_NEW     = 1 << 9,
+	TT_CLIENT_PENDING = 1 << 10
 };
 
 struct batman_packet {