mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
batman-adv: tt: clear ROAM flag when re-adding a pending local client
When a ROAMING_ADV is received for an announced local client,
batadv_tt_local_mark_removed() sets BATADV_TT_CLIENT_ROAM, queues a
DEL|ROAM change and marks the entry as BATADV_TT_CLIENT_PENDING. If the
client sends a frame again before the next TTVN commit,
batadv_tt_local_add_existing() only clears the PENDING flag and returns
early. The ADD cancels the queued DEL, but the entry keeps the ROAM flag:
* batadv_is_my_client() reports the client as not served by this node
* batadv_tt_local_client_is_roaming() reroutes unicast frames for it to
the node which sent the ROAMING_ADV
The ROAM flag is only removed with the next frame of the client.
Since BATADV_TT_CLIENT_ROAM is set together with BATADV_TT_CLIENT_PENDING,
it has to be cleared also at the same time with BATADV_TT_CLIENT_PENDING
when the client roamed back.
Cc: stable@vger.kernel.org
Fixes: 068ee6e204 ("batman-adv: roaming handling mechanism redesign")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
parent
10f24f0584
commit
cc2186d785
|
|
@ -894,6 +894,7 @@ static bool batadv_tt_local_add_existing(struct batadv_priv *bat_priv,
|
|||
bool *roamed_back)
|
||||
{
|
||||
struct batadv_tt_common_entry *common = &tt_local->common;
|
||||
bool readded = false;
|
||||
|
||||
tt_local->last_seen = jiffies;
|
||||
|
||||
|
|
@ -908,8 +909,7 @@ static bool batadv_tt_local_add_existing(struct batadv_priv *bat_priv,
|
|||
* flag can be reset like it was never enqueued
|
||||
*/
|
||||
common->flags &= ~BATADV_TT_CLIENT_PENDING;
|
||||
|
||||
return true;
|
||||
readded = true;
|
||||
}
|
||||
|
||||
if (common->flags & BATADV_TT_CLIENT_ROAM) {
|
||||
|
|
@ -926,7 +926,7 @@ static bool batadv_tt_local_add_existing(struct batadv_priv *bat_priv,
|
|||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return readded;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user