mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 12:33:44 +02:00
Build fix for network ID remap hack.
This commit is contained in:
parent
aac40562d3
commit
d8d71df301
1 changed files with 3 additions and 2 deletions
|
@ -73,7 +73,8 @@ NodeConfig::NodeConfig(const RuntimeEnvironment *renv,const char *authToken,unsi
|
||||||
memcpy(_controlSocketKey,csk,32);
|
memcpy(_controlSocketKey,csk,32);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::map<std::string,bool> networksDotD(Utils::listDirectory((_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d").c_str()));
|
std::string networksFolder(_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d");
|
||||||
|
std::map<std::string,bool> networksDotD(Utils::listDirectory(networksFolder.c_str()));
|
||||||
std::set<uint64_t> nwids;
|
std::set<uint64_t> nwids;
|
||||||
for(std::map<std::string,bool>::iterator d(networksDotD.begin());d!=networksDotD.end();++d) {
|
for(std::map<std::string,bool>::iterator d(networksDotD.begin());d!=networksDotD.end();++d) {
|
||||||
if (!d->second) {
|
if (!d->second) {
|
||||||
|
@ -86,7 +87,7 @@ NodeConfig::NodeConfig(const RuntimeEnvironment *renv,const char *authToken,unsi
|
||||||
// config file. New one will be created.
|
// config file. New one will be created.
|
||||||
if (nwid == 0x6c92786fee000001ULL) {
|
if (nwid == 0x6c92786fee000001ULL) {
|
||||||
nwid = 0xbc8f9a8ee3000001ULL;
|
nwid = 0xbc8f9a8ee3000001ULL;
|
||||||
Utils::rm(networksDotD + ZT_PATH_SEPARATOR_S + d->first);
|
Utils::rm((networksFolder + ZT_PATH_SEPARATOR_S + d->first).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nwid > 0)
|
if (nwid > 0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue