batman-adv: in case of roaming mark the client with TT_CLIENT_ROAM

Message ID 1322945658-25154-1-git-send-email-ordex@autistici.org (mailing list archive)
State Superseded, archived
Headers

Commit Message

Antonio Quartulli Dec. 3, 2011, 8:54 p.m. UTC
  Whenever we add a local client for which we already have a global entry, the
latter has to be marked with the TT_CLIENT_ROAM flag (instead of
TT_CLIENT_PENDING)

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
 translation-table.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
  

Comments

Marek Lindner Dec. 4, 2011, 9:36 a.m. UTC | #1
On Sunday, December 04, 2011 04:54:18 Antonio Quartulli wrote:
> Whenever we add a local client for which we already have a global entry,
> the latter has to be marked with the TT_CLIENT_ROAM flag (instead of
> TT_CLIENT_PENDING)

Am I right that this patch should go into linux 3.2 ? Maybe even to stable ? 
If so, which versions ? linux 3.0 and linux 3.1 ?
Are there more patches for stable from your end ? I'd like to send them in one 
go and not one by one ..

Regards,
Marek
  
Antonio Quartulli Dec. 4, 2011, 10:35 a.m. UTC | #2
On Sun, Dec 04, 2011 at 05:36:43 +0800, Marek Lindner wrote:
> On Sunday, December 04, 2011 04:54:18 Antonio Quartulli wrote:
> > Whenever we add a local client for which we already have a global entry,
> > the latter has to be marked with the TT_CLIENT_ROAM flag (instead of
> > TT_CLIENT_PENDING)
> 
> Am I right that this patch should go into linux 3.2 ? Maybe even to stable ? 
> If so, which versions ? linux 3.0 and linux 3.1 ?
> Are there more patches for stable from your end ? I'd like to send them in one 
> go and not one by one ..

Actually I would send it to stable-3.1.

Please, give me 12hours more for the other patches. I'll work on them later
today.

Cheers,
  

Patch

diff --git a/translation-table.c b/translation-table.c
index 7a7df4a..cf3e2c2 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -242,9 +242,11 @@  void tt_local_add(struct net_device *soft_iface, const uint8_t *addr,
 	if (tt_global_entry) {
 		/* This node is probably going to update its tt table */
 		tt_global_entry->orig_node->tt_poss_change = true;
-		/* The global entry has to be marked as PENDING and has to be
+		/* The global entry has to be marked as ROAMING and has to be
 		 * kept for consistency purpose */
-		tt_global_entry->common.flags |= TT_CLIENT_PENDING;
+		tt_global_entry->common.flags |= TT_CLIENT_ROAM;
+		tt_global_entry->roam_at = jiffies;
+
 		send_roam_adv(bat_priv, tt_global_entry->common.addr,
 			      tt_global_entry->orig_node);
 	}