From patchwork Thu Jun 1 08:58:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andreas Pape X-Patchwork-Id: 17031 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 6C05581FD1; Thu, 1 Jun 2017 10:58:28 +0200 (CEST) Received: from mail2.phoenixcontact.com (mail2.phoenixcontact.com [62.157.123.121]) by open-mesh.org (Postfix) with ESMTPS id 686FA81FC4 for ; Thu, 1 Jun 2017 10:58:26 +0200 (CEST) Received: from PxCE-N0673.europe.phoenixcontact.com ([10.208.240.77]) by de-nice01.europe.phoenixcontact.com with ESMTP id 2017060110581594-662904 ; Thu, 1 Jun 2017 10:58:15 +0200 From: Andreas Pape To: b.a.t.m.a.n@lists.open-mesh.org X-TNEFEvaluated: 1 Message-ID: <20170601085804.4756-1-apape@phoenixcontact.com> Date: Thu, 1 Jun 2017 10:58:04 +0200 content-transfer-encoding: quoted-printable content-type: text/plain; charset="utf-8" Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: prevent adding of loop detection mac addresses to global tt X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "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 --- net/batman-adv/translation-table.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) -- 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 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);