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: prevent adding of loop detection mac addresses to global tt
@ 2017-06-01  8:58 Andreas Pape
  2017-06-01 11:43 ` Simon Wunderlich
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Pape @ 2017-06-01  8:58 UTC (permalink / raw)
  To: b.a.t.m.a.n

This patch prevents that entries in the global translation table are generated
for mac addresses used by loop detection frames.

Signed-off-by: Andreas Pape <apape@phoenixcontact.com>
---
 net/batman-adv/translation-table.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index e75b493..ca1e0f7 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -1618,8 +1618,10 @@ static bool batadv_tt_global_add(struct batadv_priv *bat_priv,
 	struct batadv_tt_common_entry *common;
 	u16 local_flags;

-	/* ignore global entries from backbone nodes */
-	if (batadv_bla_is_backbone_gw_orig(bat_priv, orig_node->orig, vid))
+	/* ignore global entries from backbone nodes or
+	 * adding of entries related to loop detect frames */
+	if (batadv_bla_is_backbone_gw_orig(bat_priv, orig_node->orig, vid) ||
+		batadv_bla_is_loopdetect_mac(tt_addr))
 		return true;

 	tt_global_entry = batadv_tt_global_hash_find(bat_priv, tt_addr, vid);
--
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: Ulrich Leidecker, Christoph Leifer
__________________________________________________________________
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

end of thread, other threads:[~2017-06-01 14:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-01  8:58 [B.A.T.M.A.N.] [PATCH] batman-adv: prevent adding of loop detection mac addresses to global tt Andreas Pape
2017-06-01 11:43 ` Simon Wunderlich
2017-06-01 14:48   ` [B.A.T.M.A.N.] Antwort: " Andreas Pape

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