diff options
author | Antonio Quartulli <ordex@autistici.org> | 2011-07-07 13:35:36 (GMT) |
---|---|---|
committer | Marek Lindner <lindner_marek@yahoo.de> | 2011-08-22 13:16:20 (GMT) |
commit | 59b699cdee039d75915c354da06937102d1f9a84 (patch) | |
tree | 33fabd9cac27cb7bc1d3fbc765f098b5b8e8575e /net/batman-adv/soft-interface.c | |
parent | bc2790808a7a3699a7c9f72f7ad225c8504824aa (diff) | |
download | linux-59b699cdee039d75915c354da06937102d1f9a84.tar.xz |
batman-adv: implement AP-isolation on the receiver side
When a node receives a unicast packet it checks if the source and the
destination client can communicate or not due to the AP isolation
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/soft-interface.c')
-rw-r--r-- | net/batman-adv/soft-interface.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index 6deed44..9addbab 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c @@ -739,6 +739,9 @@ void interface_rx(struct net_device *soft_iface, soft_iface->last_rx = jiffies; + if (is_ap_isolated(bat_priv, ethhdr->h_source, ethhdr->h_dest)) + goto dropped; + netif_rx(skb); goto out; @@ -812,6 +815,7 @@ struct net_device *softif_create(const char *name) atomic_set(&bat_priv->aggregated_ogms, 1); atomic_set(&bat_priv->bonding, 0); + atomic_set(&bat_priv->ap_isolation, 0); atomic_set(&bat_priv->vis_mode, VIS_TYPE_CLIENT_UPDATE); atomic_set(&bat_priv->gw_mode, GW_MODE_OFF); atomic_set(&bat_priv->gw_sel_class, 20); |