Commit 5870adc68fc39d81089f1e80efdf64b97e5c37a1

Authored by Marek Lindner
Committed by Antonio Quartulli
1 parent a18e08bdcf

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>

Showing 1 changed file with 4 additions and 4 deletions Side-by-side Diff

net/batman-adv/translation-table.c
... ... @@ -2031,10 +2031,10 @@
2031 2031 {
2032 2032 struct tt_local_entry *tt_local_entry = NULL;
2033 2033 struct tt_global_entry *tt_global_entry = NULL;
2034   - bool ret = true;
  2034 + bool ret = false;
2035 2035  
2036 2036 if (!atomic_read(&bat_priv->ap_isolation))
2037   - return false;
  2037 + goto out;
2038 2038  
2039 2039 tt_local_entry = tt_local_hash_find(bat_priv, dst);
2040 2040 if (!tt_local_entry)
2041 2041  
... ... @@ -2044,10 +2044,10 @@
2044 2044 if (!tt_global_entry)
2045 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 2048 goto out;
2049 2049  
2050   - ret = false;
  2050 + ret = true;
2051 2051  
2052 2052 out:
2053 2053 if (tt_global_entry)