public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] batman-adv: unset the TT_CLIENT_PENDING flag if the new local entry already exists
@ 2012-01-15 23:36 Antonio Quartulli
  2012-04-04  9:18 ` Marek Lindner
  0 siblings, 1 reply; 2+ messages in thread
From: Antonio Quartulli @ 2012-01-15 23:36 UTC (permalink / raw)
  To: b.a.t.m.a.n

When trying to add a new tt_local_entry, if such entry already exists, we have
to ensure that the TT_CLIENT_PENDING flag is not set, otherwise the entry will
be deleted soon.

Reported-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
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 27753a0..65de6b7 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -188,6 +188,8 @@ void tt_local_add(struct net_device *soft_iface, const uint8_t *addr,
 
 	if (tt_local_entry) {
 		tt_local_entry->last_seen = jiffies;
+		/* possibly unset the TT_CLIENT_PENDING flag */
+		tt_local_entry->common.flags &= ~TT_CLIENT_PENDING;
 		goto out;
 	}
 
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: unset the TT_CLIENT_PENDING flag if the new local entry already exists
  2012-01-15 23:36 [B.A.T.M.A.N.] [PATCH] batman-adv: unset the TT_CLIENT_PENDING flag if the new local entry already exists Antonio Quartulli
@ 2012-04-04  9:18 ` Marek Lindner
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2012-04-04  9:18 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Monday, January 16, 2012 00:36:58 Antonio Quartulli wrote:
> When trying to add a new tt_local_entry, if such entry already exists, we
> have to ensure that the TT_CLIENT_PENDING flag is not set, otherwise the
> entry will be deleted soon.

Applied in revision 7e7fc81.

Thanks,
Marek

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-04  9:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-15 23:36 [B.A.T.M.A.N.] [PATCH] batman-adv: unset the TT_CLIENT_PENDING flag if the new local entry already exists Antonio Quartulli
2012-04-04  9:18 ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox