/* This function checks if the mesh configuration of a mesh point matches the local mesh configuration, i.e. if both nodes belong to the same mesh network.  */
bool mesh_matches_local(struct ieee802_11_elems *ie, struct ieee80211_sub_if_data *sdata)
/* This function checks if the mesh configuration of a mesh point matches the local mesh configuration, i.e. if both nodes belong to the same mesh network.  */
bool mesh_matches_local(struct ieee802_11_elems *ie, struct ieee80211_sub_if_data *sdata)
{
	struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
	if (ifmsh->mesh_id_len == ie->mesh_id_len &&
		memcmp(ifmsh->mesh_id, ie->mesh_id, ie->mesh_id_len) == 0 &&
		(ifmsh->mesh_pp_id == ie->mesh_config->meshconf_psel) &&
		(ifmsh->mesh_pm_id == ie->mesh_config->meshconf_pmetric) &&
		(ifmsh->mesh_cc_id == ie->mesh_config->meshconf_congest) &&
		(ifmsh->mesh_sp_id == ie->mesh_config->meshconf_synch) &&
		(ifmsh->mesh_auth_id == ie->mesh_config->meshconf_auth))
		return true;
	return false;
}