|
@@ -209,10 +209,13 @@ void batadv_mesh_free(struct net_device *soft_iface)
|
|
|
* interfaces in the current mesh
|
|
|
* @bat_priv: the bat priv with all the soft interface information
|
|
|
* @addr: the address to check
|
|
|
+ *
|
|
|
+ * Returns 'true' if the mac address was found, false otherwise.
|
|
|
*/
|
|
|
-int batadv_is_my_mac(struct batadv_priv *bat_priv, const uint8_t *addr)
|
|
|
+bool batadv_is_my_mac(struct batadv_priv *bat_priv, const uint8_t *addr)
|
|
|
{
|
|
|
const struct batadv_hard_iface *hard_iface;
|
|
|
+ bool is_my_mac = false;
|
|
|
|
|
|
rcu_read_lock();
|
|
|
list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) {
|
|
@@ -223,12 +226,12 @@ int batadv_is_my_mac(struct batadv_priv *bat_priv, const uint8_t *addr)
|
|
|
continue;
|
|
|
|
|
|
if (batadv_compare_eth(hard_iface->net_dev->dev_addr, addr)) {
|
|
|
- rcu_read_unlock();
|
|
|
- return 1;
|
|
|
+ is_my_mac = true;
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
rcu_read_unlock();
|
|
|
- return 0;
|
|
|
+ return is_my_mac;
|
|
|
}
|
|
|
|
|
|
/**
|