Commit 5870adc6 authored by Marek Lindner's avatar Marek Lindner Committed by Antonio Quartulli

batman-adv: only drop packets of known wifi clients

bug introduced with 59b699cd

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: default avatarMarek Lindner <lindner_marek@yahoo.de>
Acked-by: default avatarAntonio Quartulli <ordex@autistici.org>
parent a18e08bd
...@@ -2031,10 +2031,10 @@ bool is_ap_isolated(struct bat_priv *bat_priv, uint8_t *src, uint8_t *dst) ...@@ -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_local_entry *tt_local_entry = NULL;
struct tt_global_entry *tt_global_entry = NULL; struct tt_global_entry *tt_global_entry = NULL;
bool ret = true; bool ret = false;
if (!atomic_read(&bat_priv->ap_isolation)) if (!atomic_read(&bat_priv->ap_isolation))
return false; goto out;
tt_local_entry = tt_local_hash_find(bat_priv, dst); tt_local_entry = tt_local_hash_find(bat_priv, dst);
if (!tt_local_entry) if (!tt_local_entry)
...@@ -2044,10 +2044,10 @@ bool is_ap_isolated(struct bat_priv *bat_priv, uint8_t *src, uint8_t *dst) ...@@ -2044,10 +2044,10 @@ bool is_ap_isolated(struct bat_priv *bat_priv, uint8_t *src, uint8_t *dst)
if (!tt_global_entry) if (!tt_global_entry)
goto out; goto out;
if (_is_ap_isolated(tt_local_entry, tt_global_entry)) if (!_is_ap_isolated(tt_local_entry, tt_global_entry))
goto out; goto out;
ret = false; ret = true;
out: out:
if (tt_global_entry) if (tt_global_entry)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment