aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/send.c
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2011-07-06 19:40:58 -0400
committerMarek Lindner <lindner_marek@yahoo.de>2011-07-07 12:49:26 -0400
commit058d0e26989e3da2fa031f551235f6ff1e0bc27c (patch)
treef39ce9771166b9a110a38c65621eb2128c152068 /net/batman-adv/send.c
parentc8c991bf2076d711f14ff9063db306fd522ddcd4 (diff)
batman-adv: keep local table consistency for further TT_RESPONSE
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>
Diffstat (limited to 'net/batman-adv/send.c')
-rw-r--r--net/batman-adv/send.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
index 4b8e11bc14fa..58d14472068c 100644
--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -309,10 +309,8 @@ void schedule_own_packet(struct hard_iface *hard_iface)
309 if (hard_iface == primary_if) { 309 if (hard_iface == primary_if) {
310 /* if at least one change happened */ 310 /* if at least one change happened */
311 if (atomic_read(&bat_priv->tt_local_changes) > 0) { 311 if (atomic_read(&bat_priv->tt_local_changes) > 0) {
312 tt_commit_changes(bat_priv);
312 prepare_packet_buffer(bat_priv, hard_iface); 313 prepare_packet_buffer(bat_priv, hard_iface);
313 /* Increment the TTVN only once per OGM interval */
314 atomic_inc(&bat_priv->ttvn);
315 bat_priv->tt_poss_change = false;
316 } 314 }
317 315
318 /* if the changes have been sent enough times */ 316 /* if the changes have been sent enough times */