On Friday 26 February 2016 14:19:28 Andreas Pape wrote:
Make sure that claiming of devices due to dat handling is only done for non-local mac addresses. As dat is handled after the normal bla code this does not break the roaming client scenario for bla.
Signed-off-by: Andreas Pape apape@phoenixcontact.com
net/batman-adv/bridge_loop_avoidance.c | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c index 739f80f..32a6168 100644 --- a/net/batman-adv/bridge_loop_avoidance.c +++ b/net/batman-adv/bridge_loop_avoidance.c @@ -1959,13 +1959,19 @@ bool batadv_bla_handle_local_claim(struct batadv_priv *bat_priv, primary_if->net_dev->dev_addr)) ret = false; } else {
/* If there is no claim, claim the device */
batadv_dbg(BATADV_DBG_BLA, bat_priv,
"Handle claim locally for currently not claimed mac %pM.\n",
search_claim.addr);
/* If there is no claim, claim the device
* but only if this isn't a mac address
* out of the local tt
*/
if (!batadv_is_my_client(bat_priv, addr, vid)) {
batadv_dbg(BATADV_DBG_BLA, bat_priv,
"bla_handle_local_claim(): Handle claim locally for currently not claimed mac %pM.\n",
search_claim.addr);
batadv_handle_claim(bat_priv, primary_if,
primary_if->net_dev->dev_addr, addr, vid);
batadv_handle_claim(bat_priv, primary_if,
primary_if->net_dev->dev_addr,
addr, vid);
}}
What do you think about inverting the check and as jump to out when batadv_is_my_client(bat_priv, addr, vid) is true?
The debug output change looks like it should be in patch 5/7.
Kind regards, Sven