* [B.A.T.M.A.N.] [PATCHv2 6/7] batman-adv: bugfix for dat optimiziation patch
@ 2016-02-26 13:19 Andreas Pape
2016-02-26 16:10 ` Sven Eckelmann
2016-03-10 14:58 ` Simon Wunderlich
0 siblings, 2 replies; 3+ messages in thread
From: Andreas Pape @ 2016-02-26 13:19 UTC (permalink / raw)
To: b.a.t.m.a.n
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);
+ }
}
out:
--
1.7.0.4
..................................................................
PHOENIX CONTACT ELECTRONICS GmbH
Sitz der Gesellschaft / registered office of the company: 31812 Bad Pyrmont
USt-Id-Nr.: DE811742156
Amtsgericht Hannover HRB 100528 / district court Hannover HRB 100528
Geschäftsführer / Executive Board: Roland Bent, Dr. Martin Heubeck
___________________________________________________________________
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren, jegliche anderweitige Verwendung sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
----------------------------------------------------------------------------------------------------
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure, distribution or other use of the material or parts thereof is strictly forbidden.
___________________________________________________________________
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [B.A.T.M.A.N.] [PATCHv2 6/7] batman-adv: bugfix for dat optimiziation patch
2016-02-26 13:19 [B.A.T.M.A.N.] [PATCHv2 6/7] batman-adv: bugfix for dat optimiziation patch Andreas Pape
@ 2016-02-26 16:10 ` Sven Eckelmann
2016-03-10 14:58 ` Simon Wunderlich
1 sibling, 0 replies; 3+ messages in thread
From: Sven Eckelmann @ 2016-02-26 16:10 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 1812 bytes --]
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
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [B.A.T.M.A.N.] [PATCHv2 6/7] batman-adv: bugfix for dat optimiziation patch
2016-02-26 13:19 [B.A.T.M.A.N.] [PATCHv2 6/7] batman-adv: bugfix for dat optimiziation patch Andreas Pape
2016-02-26 16:10 ` Sven Eckelmann
@ 2016-03-10 14:58 ` Simon Wunderlich
1 sibling, 0 replies; 3+ messages in thread
From: Simon Wunderlich @ 2016-03-10 14:58 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 598 bytes --]
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>
I believe this should actually be squashed into your PATCH 1/7?
But this change is under discussion anyway ...
For future patches, please don't send bugfixes for your own patches within the
same series separately but squash them in the right patches. :)
Thanks,
Simon
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-10 14:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-26 13:19 [B.A.T.M.A.N.] [PATCHv2 6/7] batman-adv: bugfix for dat optimiziation patch Andreas Pape
2016-02-26 16:10 ` Sven Eckelmann
2016-03-10 14:58 ` Simon Wunderlich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox