aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/translation-table.c
diff options
context:
space:
mode:
authorMarek Lindner <lindner_marek@yahoo.de>2012-06-20 11:16:05 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-06-23 11:21:11 -0400
commit5870adc68fc39d81089f1e80efdf64b97e5c37a1 (patch)
treed2a8c916e3f483cdb4c3aa4e82cef2479e55e674 /net/batman-adv/translation-table.c
parenta18e08bdcf845efb7344cea146e683df746bbfb4 (diff)
batman-adv: only drop packets of known wifi clients
bug introduced with 59b699cdee039d75915c354da06937102d1f9a84 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 <lindner_marek@yahoo.de> Acked-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/translation-table.c')
-rw-r--r--net/batman-adv/translation-table.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index a66c2dcd1088..660c40fe13ea 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -2031,10 +2031,10 @@ bool is_ap_isolated(struct bat_priv *bat_priv, uint8_t *src, uint8_t *dst)
2031{ 2031{
2032 struct tt_local_entry *tt_local_entry = NULL; 2032 struct tt_local_entry *tt_local_entry = NULL;
2033 struct tt_global_entry *tt_global_entry = NULL; 2033 struct tt_global_entry *tt_global_entry = NULL;
2034 bool ret = true; 2034 bool ret = false;
2035 2035
2036 if (!atomic_read(&bat_priv->ap_isolation)) 2036 if (!atomic_read(&bat_priv->ap_isolation))
2037 return false; 2037 goto out;
2038 2038
2039 tt_local_entry = tt_local_hash_find(bat_priv, dst); 2039 tt_local_entry = tt_local_hash_find(bat_priv, dst);
2040 if (!tt_local_entry) 2040 if (!tt_local_entry)
@@ -2044,10 +2044,10 @@ bool is_ap_isolated(struct bat_priv *bat_priv, uint8_t *src, uint8_t *dst)
2044 if (!tt_global_entry) 2044 if (!tt_global_entry)
2045 goto out; 2045 goto out;
2046 2046
2047 if (_is_ap_isolated(tt_local_entry, tt_global_entry)) 2047 if (!_is_ap_isolated(tt_local_entry, tt_global_entry))
2048 goto out; 2048 goto out;
2049 2049
2050 ret = false; 2050 ret = true;
2051 2051
2052out: 2052out:
2053 if (tt_global_entry) 2053 if (tt_global_entry)