diff options
author | Antonio Quartulli <ordex@autistici.org> | 2013-04-03 13:10:26 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2013-04-17 16:31:22 -0400 |
commit | fe8a93b95145c66adf196eea4a919dfe0b7c57db (patch) | |
tree | e7251d3c966129aaba6366ca35a74a3d8b4f014a /net/batman-adv/main.c | |
parent | 361cd29cf9363505c2a35bbf9a034a22feebfb07 (diff) |
batman-adv: make is_my_mac() check for the current mesh only
On a multi-mesh node (a node running more than one batman-adv
virtual interface) batadv_is_my_mac() has to check MAC
addresses of hard interfaces belonging to the current mesh
only.
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/main.c')
-rw-r--r-- | net/batman-adv/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index 0488d70c8c35..fa563e497c48 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c | |||
@@ -169,7 +169,7 @@ void batadv_mesh_free(struct net_device *soft_iface) | |||
169 | atomic_set(&bat_priv->mesh_state, BATADV_MESH_INACTIVE); | 169 | atomic_set(&bat_priv->mesh_state, BATADV_MESH_INACTIVE); |
170 | } | 170 | } |
171 | 171 | ||
172 | int batadv_is_my_mac(const uint8_t *addr) | 172 | int batadv_is_my_mac(struct batadv_priv *bat_priv, const uint8_t *addr) |
173 | { | 173 | { |
174 | const struct batadv_hard_iface *hard_iface; | 174 | const struct batadv_hard_iface *hard_iface; |
175 | 175 | ||
@@ -178,6 +178,9 @@ int batadv_is_my_mac(const uint8_t *addr) | |||
178 | if (hard_iface->if_status != BATADV_IF_ACTIVE) | 178 | if (hard_iface->if_status != BATADV_IF_ACTIVE) |
179 | continue; | 179 | continue; |
180 | 180 | ||
181 | if (hard_iface->soft_iface != bat_priv->soft_iface) | ||
182 | continue; | ||
183 | |||
181 | if (batadv_compare_eth(hard_iface->net_dev->dev_addr, addr)) { | 184 | if (batadv_compare_eth(hard_iface->net_dev->dev_addr, addr)) { |
182 | rcu_read_unlock(); | 185 | rcu_read_unlock(); |
183 | return 1; | 186 | return 1; |