mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-07 04:53:44 +02:00
Add temporary code to remap old Earth network ID to new one.
This commit is contained in:
parent
903b5b4218
commit
aac40562d3
1 changed files with 9 additions and 0 deletions
|
@ -80,6 +80,15 @@ NodeConfig::NodeConfig(const RuntimeEnvironment *renv,const char *authToken,unsi
|
||||||
std::string::size_type dot = d->first.rfind(".conf");
|
std::string::size_type dot = d->first.rfind(".conf");
|
||||||
if (dot != std::string::npos) {
|
if (dot != std::string::npos) {
|
||||||
uint64_t nwid = strtoull(d->first.substr(0,dot).c_str(),(char **)0,16);
|
uint64_t nwid = strtoull(d->first.substr(0,dot).c_str(),(char **)0,16);
|
||||||
|
|
||||||
|
// TODO: remove legacy code -- this changes the network
|
||||||
|
// ID for Earth if it's subscribed. Also deletes old
|
||||||
|
// config file. New one will be created.
|
||||||
|
if (nwid == 0x6c92786fee000001ULL) {
|
||||||
|
nwid = 0xbc8f9a8ee3000001ULL;
|
||||||
|
Utils::rm(networksDotD + ZT_PATH_SEPARATOR_S + d->first);
|
||||||
|
}
|
||||||
|
|
||||||
if (nwid > 0)
|
if (nwid > 0)
|
||||||
nwids.insert(nwid);
|
nwids.insert(nwid);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue