diff options
author | Antonio Quartulli <antonio@open-mesh.com> | 2013-07-02 05:04:36 -0400 |
---|---|---|
committer | Antonio Quartulli <antonio@meshcoding.com> | 2013-10-19 11:28:47 -0400 |
commit | b8cbd81d0944cd2dc097b2b4ae8adaf639c5b4df (patch) | |
tree | dc3b3b50ac89e64022dcfaacf278e3d5d6325cf6 /net/batman-adv/soft-interface.c | |
parent | 90f4435da43191025712fdcf6b0dc09c018456e9 (diff) |
batman-adv: make the AP isolation attribute VLAN specific
AP isolation has to be enabled on one VLAN interface only.
This patch moves the AP isolation attribute to the per-vlan
interface attribute set, enabling it to have a different
value depending on the selected vlan.
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
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 | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index f74200c7e553..baa74b976c6d 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
@@ -381,7 +381,8 @@ void batadv_interface_rx(struct net_device *soft_iface, | |||
381 | batadv_tt_add_temporary_global_entry(bat_priv, orig_node, | 381 | batadv_tt_add_temporary_global_entry(bat_priv, orig_node, |
382 | ethhdr->h_source, vid); | 382 | ethhdr->h_source, vid); |
383 | 383 | ||
384 | if (batadv_is_ap_isolated(bat_priv, ethhdr->h_source, ethhdr->h_dest)) | 384 | if (batadv_is_ap_isolated(bat_priv, ethhdr->h_source, ethhdr->h_dest, |
385 | vid)) | ||
385 | goto dropped; | 386 | goto dropped; |
386 | 387 | ||
387 | netif_rx(skb); | 388 | netif_rx(skb); |
@@ -458,6 +459,8 @@ int batadv_softif_create_vlan(struct batadv_priv *bat_priv, unsigned short vid) | |||
458 | vlan->vid = vid; | 459 | vlan->vid = vid; |
459 | atomic_set(&vlan->refcount, 1); | 460 | atomic_set(&vlan->refcount, 1); |
460 | 461 | ||
462 | atomic_set(&vlan->ap_isolation, 0); | ||
463 | |||
461 | err = batadv_sysfs_add_vlan(bat_priv->soft_iface, vlan); | 464 | err = batadv_sysfs_add_vlan(bat_priv->soft_iface, vlan); |
462 | if (err) { | 465 | if (err) { |
463 | kfree(vlan); | 466 | kfree(vlan); |
@@ -657,7 +660,6 @@ static int batadv_softif_init_late(struct net_device *dev) | |||
657 | #ifdef CONFIG_BATMAN_ADV_DAT | 660 | #ifdef CONFIG_BATMAN_ADV_DAT |
658 | atomic_set(&bat_priv->distributed_arp_table, 1); | 661 | atomic_set(&bat_priv->distributed_arp_table, 1); |
659 | #endif | 662 | #endif |
660 | atomic_set(&bat_priv->ap_isolation, 0); | ||
661 | atomic_set(&bat_priv->gw_mode, BATADV_GW_MODE_OFF); | 663 | atomic_set(&bat_priv->gw_mode, BATADV_GW_MODE_OFF); |
662 | atomic_set(&bat_priv->gw_sel_class, 20); | 664 | atomic_set(&bat_priv->gw_sel_class, 20); |
663 | atomic_set(&bat_priv->gw.bandwidth_down, 100); | 665 | atomic_set(&bat_priv->gw.bandwidth_down, 100); |