From patchwork Wed Jun 20 15:16:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Lindner X-Patchwork-Id: 2019 Return-Path: Received: from nm23-vm1.bullet.mail.ukl.yahoo.com (nm23-vm1.bullet.mail.ukl.yahoo.com [217.146.177.100]) by open-mesh.org (Postfix) with SMTP id BA1D06008C6 for ; Wed, 20 Jun 2012 17:16:15 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key; insecure key) header.i=@yahoo.de; dkim-adsp=pass Received: from [217.146.183.216] by nm23.bullet.mail.ukl.yahoo.com with NNFMP; 20 Jun 2012 15:16:15 -0000 Received: from [77.238.184.76] by tm9.bullet.mail.ukl.yahoo.com with NNFMP; 20 Jun 2012 15:16:15 -0000 Received: from [127.0.0.1] by smtp145.mail.ukl.yahoo.com with NNFMP; 20 Jun 2012 15:16:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s1024; t=1340205375; bh=s/x7XlCMYYEBtk0dlzg7b2tUY138FfEVTj3ZSSewgsg=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer; b=kAxHz+BRolhIApzNbRskmuYDeJWtYw7EGVy1HP8F8YAL9HIuFv8rBLQabprzHuUWRUZH0UFoM0dtTRx7vHliYeIMsrnNWYl9iGns0kToQvfiFyuYW8EwZeGiPqjEK8cTvKCzZPuxlAfB0Gi3m3RCe7ExrGev9iRhtG6dEqZ2Sm4= X-Yahoo-Newman-Id: 381602.89270.bm@smtp145.mail.ukl.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: wp._WpIVM1lgr8FL0ggyN3rCYjfR4bMmsE_7FBrarGgo2CN Yi06nXQltMYli9XZZxtFVHuVvn.fwAkM1oemMxjObBkeoxHJWTP0AQA21x3v n7XTqjnzqkk91DlWwOPYkYMabTHdZF1zhFGAgDSCC3.a4YGafaziR7rfch.q lKD937sWojTqzLNcZptyxD_Rbvyl7EGnssD7loTJ6rGmK_Mx9o0ltJr1EySM yLQoaLoh9jEsr_GYyaG_gdGWZkcSHAh7gfFYbOMZDuyzwZ1qMut1W9D.1iPr kJy1rYZ_Qrv.NTnyQpR4GPBHuzYNXq_rDffBbewTtbI8PCCw0Giuj6pelQqY kXye0osQJHea5mgdlm0d2po8UYcygRPynBH3R1x5JfIKkYfMYh1KL1wlKcUM Awg-- X-Yahoo-SMTP: tW.h3tiswBBMXO2coYcbPigGD5Lt6zY_.Zc- Received: from localhost (lindner_marek@217.85.68.43 with plain) by smtp145.mail.ukl.yahoo.com with SMTP; 20 Jun 2012 15:16:14 +0000 GMT From: Marek Lindner To: b.a.t.m.a.n@lists.open-mesh.org Date: Wed, 20 Jun 2012 17:16:05 +0200 Message-Id: <1340205365-25052-1-git-send-email-lindner_marek@yahoo.de> X-Mailer: git-send-email 1.7.9.1 Cc: Marek Lindner Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: only drop packets of known wifi clients X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2012 15:16:16 -0000 If the source or destination mac address of an ethernet packet could not be found in the translation table the packet was dropped if AP isolation was turned on. This behavior would make it impossible to send broadcast packets over the mesh as the broadcast address will never enter the translation table. Signed-off-by: Marek Lindner Acked-by: Antonio Quartulli --- This patch is for maint and possibly for stable. translation-table.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/translation-table.c b/translation-table.c index a66c2dc..660c40f 100644 --- a/translation-table.c +++ b/translation-table.c @@ -2031,10 +2031,10 @@ bool is_ap_isolated(struct bat_priv *bat_priv, uint8_t *src, uint8_t *dst) { struct tt_local_entry *tt_local_entry = NULL; struct tt_global_entry *tt_global_entry = NULL; - bool ret = true; + bool ret = false; if (!atomic_read(&bat_priv->ap_isolation)) - return false; + goto out; tt_local_entry = tt_local_hash_find(bat_priv, dst); if (!tt_local_entry) @@ -2044,10 +2044,10 @@ bool is_ap_isolated(struct bat_priv *bat_priv, uint8_t *src, uint8_t *dst) if (!tt_global_entry) goto out; - if (_is_ap_isolated(tt_local_entry, tt_global_entry)) + if (!_is_ap_isolated(tt_local_entry, tt_global_entry)) goto out; - ret = false; + ret = true; out: if (tt_global_entry)