mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2026-09-22 15:29:03 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e75a093a8c | ||
|
|
dcffb042ff | ||
|
|
d724af6a99 | ||
|
|
b30f423fc9 | ||
|
|
1fc14292fe | ||
|
|
fa7e7fc6f9 | ||
|
|
5b114791e5 | ||
|
|
9bc11a369c | ||
|
|
ac40f2191c | ||
|
|
62a93c58fd | ||
|
|
f94aea8119 | ||
|
|
37ae3b2b80 | ||
|
|
73e4286fbf | ||
|
|
4e6151ebd9 | ||
|
|
fc225401a5 | ||
|
|
d74817f79f | ||
|
|
352ec3430f | ||
|
|
978d2fcb56 | ||
|
|
01257a461e | ||
|
|
817b9d012e | ||
|
|
04b3525e0f | ||
|
|
d55c732e19 | ||
|
|
d223427e22 | ||
|
|
64856adc3c | ||
|
|
dce9cb27c1 | ||
|
|
4199c56e99 | ||
|
|
a9ca26c698 | ||
|
|
9463d4abe4 | ||
|
|
a307dff3b7 | ||
|
|
20f0bed2f6 | ||
|
|
dfe426e4e0 | ||
|
|
c36c92e077 | ||
|
|
c0efba79c7 | ||
|
|
5809941ae9 | ||
|
|
535ba8a207 | ||
|
|
43331d3fe8 | ||
|
|
9765ba334a | ||
|
|
0cd01b6ff8 | ||
|
|
5f85e33510 | ||
|
|
22301a4599 | ||
|
|
c8a907fd71 | ||
|
|
d01b1ffde5 | ||
|
|
f4e993c814 | ||
|
|
776ff46db7 | ||
|
|
9001ab5858 | ||
|
|
92e716d93d | ||
|
|
020bbed935 | ||
|
|
0c60963a94 | ||
|
|
d704f5f2d2 | ||
|
|
0ebd19c14a | ||
|
|
d4160afac8 | ||
|
|
fffb037873 | ||
|
|
1df5d0453d | ||
|
|
19d453cb90 | ||
|
|
6e7437a0d0 | ||
|
|
caf849fcba | ||
|
|
7533d244a9 |
No files matched your search
@@ -1,6 +1,19 @@
|
||||
ZeroTier Release Notes
|
||||
======
|
||||
|
||||
# 2018-07-27 -- Version 1.2.12
|
||||
|
||||
* Fixed a bug that caused exits to take a long time on Mac due to huge numbers of redundant attempts to delete managed routes.
|
||||
* Fixed a socket limit problem on Windows that caused the ZeroTier service to run out of sockets, causing the UI and CLI to be unable to access the API.
|
||||
* Fixed a threading bug in the ZeroTier Core, albeit one that never manifested on the regular ZeroTier One service/client.
|
||||
* Fixed a bug that could cause the service to crash if an authorized local client accessed an invalid URL via the control API. (Not exploitable since you needed admin access anyway.)
|
||||
|
||||
# 2018-05-08 -- Version 1.2.10
|
||||
|
||||
* Fix bug loading `moons.d/` files for federated root operation.
|
||||
* Fix compile problem with ZT_DEBUG on some versions of `clang`
|
||||
* Fix slow network startup bug related to loading of `networks.d/` cache files
|
||||
|
||||
# 2018-04-27 -- Version 1.2.8
|
||||
|
||||
* Linux version once again builds with PIE (position independent executable) flags
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 47 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 621 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
@@ -81,7 +81,7 @@ int main(int argc,char **argv)
|
||||
std::vector<World::Root> roots;
|
||||
|
||||
const uint64_t id = ZT_WORLD_ID_EARTH;
|
||||
const uint64_t ts = 1452708876314ULL; // January 13th, 2016
|
||||
const uint64_t ts = 1532555817048ULL; // July 25th, 2018
|
||||
|
||||
// Alice
|
||||
roots.push_back(World::Root());
|
||||
@@ -92,8 +92,8 @@ int main(int argc,char **argv)
|
||||
roots.back().stableEndpoints.push_back(InetAddress("2c0f:f850:154:197::33/9993")); // Johannesburg
|
||||
roots.back().stableEndpoints.push_back(InetAddress("159.203.97.171/9993")); // New York
|
||||
roots.back().stableEndpoints.push_back(InetAddress("2604:a880:800:a1::54:6001/9993")); // New York
|
||||
roots.back().stableEndpoints.push_back(InetAddress("169.57.143.104/9993")); // Sao Paolo
|
||||
roots.back().stableEndpoints.push_back(InetAddress("2607:f0d0:1d01:57::2/9993")); // Sao Paolo
|
||||
roots.back().stableEndpoints.push_back(InetAddress("131.255.6.16/9993")); // Buenos Aires
|
||||
roots.back().stableEndpoints.push_back(InetAddress("2803:eb80:0:e::2/9993")); // Buenos Aires
|
||||
roots.back().stableEndpoints.push_back(InetAddress("107.170.197.14/9993")); // San Francisco
|
||||
roots.back().stableEndpoints.push_back(InetAddress("2604:a880:1:20::200:e001/9993")); // San Francisco
|
||||
roots.back().stableEndpoints.push_back(InetAddress("128.199.197.217/9993")); // Singapore
|
||||
|
||||
File renamed without changes.
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
|
||||
#define ZT_DEFAULT_WORLD_LENGTH 634
|
||||
static const unsigned char ZT_DEFAULT_WORLD[ZT_DEFAULT_WORLD_LENGTH] = {0x01,0x00,0x00,0x00,0x00,0x08,0xea,0xc9,0x0a,0x00,0x00,0x01,0x64,0xd3,0x71,0xf0,0x58,0xb8,0xb3,0x88,0xa4,0x69,0x22,0x14,0x91,0xaa,0x9a,0xcd,0x66,0xcc,0x76,0x4c,0xde,0xfd,0x56,0x03,0x9f,0x10,0x67,0xae,0x15,0xe6,0x9c,0x6f,0xb4,0x2d,0x7b,0x55,0x33,0x0e,0x3f,0xda,0xac,0x52,0x9c,0x07,0x92,0xfd,0x73,0x40,0xa6,0xaa,0x21,0xab,0xa8,0xa4,0x89,0xfd,0xae,0xa4,0x4a,0x39,0xbf,0x2d,0x00,0x65,0x9a,0xc9,0xc8,0x18,0xeb,0xbf,0xfd,0xd5,0x32,0xf7,0x15,0x6e,0x02,0x6f,0xb9,0x01,0x0d,0xb5,0x7b,0x04,0xd8,0x3a,0xc5,0x17,0x39,0x04,0x36,0xfd,0x9d,0xc6,0x3d,0xa8,0xf3,0x8e,0x79,0xe7,0xc8,0x77,0x8d,0xcc,0x79,0xb8,0xab,0xc6,0x98,0x7c,0x9f,0x34,0x25,0x14,0xe1,0x2f,0xd7,0x97,0x11,0xec,0x34,0x4c,0x9f,0x0f,0xb4,0x85,0x0d,0x9b,0x11,0xd1,0xc2,0xce,0x00,0xc4,0x0a,0x13,0x4b,0xcb,0xc3,0xae,0x2e,0x16,0x00,0x4b,0xdc,0x90,0x5e,0x7e,0x9b,0x44,0x07,0x15,0x36,0x61,0x3c,0x64,0xaa,0xe9,0x46,0x78,0x3c,0xa7,0x18,0xc8,0xd8,0x02,0x9d,0x21,0x90,0x39,0xf3,0x00,0x01,0xf0,0x92,0x2a,0x98,0xe3,0xb3,0x4e,0xbc,0xbf,0xf3,0x33,0x26,0x9d,0xc2,0x65,0xd7,0xa0,0x20,0xaa,0xb6,0x9d,0x72,0xbe,0x4d,0x4a,0xcc,0x9c,0x8c,0x92,0x94,0x78,0x57,0x71,0x25,0x6c,0xd1,0xd9,0x42,0xa9,0x0d,0x1b,0xd1,0xd2,0xdc,0xa3,0xea,0x84,0xef,0x7d,0x85,0xaf,0xe6,0x61,0x1f,0xb4,0x3f,0xf0,0xb7,0x41,0x26,0xd9,0x0a,0x6e,0x00,0x0c,0x04,0xbc,0xa6,0x5e,0xb1,0x27,0x09,0x06,0x2a,0x03,0xb0,0xc0,0x00,0x02,0x00,0xd0,0x00,0x7d,0x00,0x01,0x00,0x00,0x00,0x00,0x27,0x09,0x04,0x9a,0x42,0xc5,0x21,0x27,0x09,0x06,0x2c,0x0f,0xf8,0x50,0x01,0x54,0x01,0x97,0x00,0x33,0xcc,0x08,0xf8,0xfa,0xcc,0x08,0x27,0x09,0x04,0x9f,0xcb,0x61,0xab,0x27,0x09,0x06,0x26,0x04,0xa8,0x80,0x08,0x00,0x00,0xa1,0x00,0x54,0x60,0x01,0x00,0xfc,0xcc,0x08,0x27,0x09,0x04,0x83,0xff,0x06,0x10,0x27,0x09,0x06,0x28,0x03,0xeb,0x80,0x00,0x00,0x00,0x0e,0x00,0x02,0x60,0x01,0x00,0xfc,0xcc,0x08,0x27,0x09,0x04,0x6b,0xaa,0xc5,0x0e,0x27,0x09,0x06,0x26,0x04,0xa8,0x80,0x00,0x01,0x00,0x20,0x02,0x00,0xe0,0x01,0x08,0xfe,0xcc,0x08,0x27,0x09,0x04,0x80,0xc7,0xc5,0xd9,0xLine truncated
|
||||
@@ -324,109 +324,6 @@ void DB::_memberChanged(nlohmann::json &old,nlohmann::json &memberConfig,bool pu
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if (old.is_object()) {
|
||||
json &config = old["config"];
|
||||
if (config.is_object()) {
|
||||
memberId = OSUtils::jsonIntHex(config["id"],0ULL);
|
||||
networkId = OSUtils::jsonIntHex(config["nwid"],0ULL);
|
||||
if ((memberId)&&(networkId)) {
|
||||
{
|
||||
std::lock_guard<std::mutex> l(_networks_l);
|
||||
auto nw2 = _networks.find(networkId);
|
||||
if (nw2 != _networks.end())
|
||||
nw = nw2->second;
|
||||
}
|
||||
if (nw) {
|
||||
std::lock_guard<std::mutex> l(nw->lock);
|
||||
if (OSUtils::jsonBool(config["activeBridge"],false))
|
||||
nw->activeBridgeMembers.erase(memberId);
|
||||
wasAuth = OSUtils::jsonBool(config["authorized"],false);
|
||||
if (wasAuth)
|
||||
nw->authorizedMembers.erase(memberId);
|
||||
json &ips = config["ipAssignments"];
|
||||
if (ips.is_array()) {
|
||||
for(unsigned long i=0;i<ips.size();++i) {
|
||||
json &ipj = ips[i];
|
||||
if (ipj.is_string()) {
|
||||
const std::string ips = ipj;
|
||||
InetAddress ipa(ips.c_str());
|
||||
ipa.setPort(0);
|
||||
nw->allocatedIps.erase(ipa);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (member.is_object()) {
|
||||
json &config = member["config"];
|
||||
if (config.is_object()) {
|
||||
if (!nw) {
|
||||
memberId = OSUtils::jsonIntHex(config["id"],0ULL);
|
||||
networkId = OSUtils::jsonIntHex(config["nwid"],0ULL);
|
||||
if ((!memberId)||(!networkId))
|
||||
return;
|
||||
std::lock_guard<std::mutex> l(_networks_l);
|
||||
std::shared_ptr<_Network> &nw2 = _networks[networkId];
|
||||
if (!nw2)
|
||||
nw2.reset(new _Network);
|
||||
nw = nw2;
|
||||
}
|
||||
|
||||
{
|
||||
std::lock_guard<std::mutex> l(nw->lock);
|
||||
|
||||
nw->members[memberId] = config;
|
||||
|
||||
if (OSUtils::jsonBool(config["activeBridge"],false))
|
||||
nw->activeBridgeMembers.insert(memberId);
|
||||
isAuth = OSUtils::jsonBool(config["authorized"],false);
|
||||
if (isAuth)
|
||||
nw->authorizedMembers.insert(memberId);
|
||||
json &ips = config["ipAssignments"];
|
||||
if (ips.is_array()) {
|
||||
for(unsigned long i=0;i<ips.size();++i) {
|
||||
json &ipj = ips[i];
|
||||
if (ipj.is_string()) {
|
||||
const std::string ips = ipj;
|
||||
InetAddress ipa(ips.c_str());
|
||||
ipa.setPort(0);
|
||||
nw->allocatedIps.insert(ipa);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!isAuth) {
|
||||
const int64_t ldt = (int64_t)OSUtils::jsonInt(config["lastDeauthorizedTime"],0ULL);
|
||||
if (ldt > nw->mostRecentDeauthTime)
|
||||
nw->mostRecentDeauthTime = ldt;
|
||||
}
|
||||
}
|
||||
|
||||
if (push)
|
||||
_controller->onNetworkMemberUpdate(networkId,memberId);
|
||||
}
|
||||
} else if (memberId) {
|
||||
if (nw) {
|
||||
std::lock_guard<std::mutex> l(nw->lock);
|
||||
nw->members.erase(memberId);
|
||||
}
|
||||
if (networkId) {
|
||||
std::lock_guard<std::mutex> l(_networks_l);
|
||||
auto er = _networkByMember.equal_range(memberId);
|
||||
for(auto i=er.first;i!=er.second;++i) {
|
||||
if (i->second == networkId) {
|
||||
_networkByMember.erase(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if ((push)&&((wasAuth)&&(!isAuth)&&(networkId)&&(memberId)))
|
||||
_controller->onNetworkMemberDeauthorize(networkId,memberId);
|
||||
}
|
||||
@@ -460,39 +357,6 @@ void DB::_networkChanged(nlohmann::json &old,nlohmann::json &networkConfig,bool
|
||||
_networks.erase(id);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if (network.is_object()) {
|
||||
json &config = network["config"];
|
||||
if (networkConfig.is_object()) {
|
||||
const std::string ids = config["id"];
|
||||
const uint64_t id = Utils::hexStrToU64(ids.c_str());
|
||||
if (id) {
|
||||
std::shared_ptr<_Network> nw;
|
||||
{
|
||||
std::lock_guard<std::mutex> l(_networks_l);
|
||||
std::shared_ptr<_Network> &nw2 = _networks[id];
|
||||
if (!nw2)
|
||||
nw2.reset(new _Network);
|
||||
nw = nw2;
|
||||
}
|
||||
{
|
||||
std::lock_guard<std::mutex> l2(nw->lock);
|
||||
nw->config = config;
|
||||
}
|
||||
if (push)
|
||||
_controller->onNetworkUpdate(id);
|
||||
}
|
||||
}
|
||||
} else if (old.is_object()) {
|
||||
const std::string ids = old["id"];
|
||||
const uint64_t id = Utils::hexStrToU64(ids.c_str());
|
||||
if (id) {
|
||||
std::lock_guard<std::mutex> l(_networks_l);
|
||||
_networks.erase(id);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void DB::_fillSummaryInfo(const std::shared_ptr<_Network> &nw,NetworkSummaryInfo &info)
|
||||
|
||||
@@ -82,6 +82,7 @@ public:
|
||||
virtual ~DB();
|
||||
|
||||
virtual bool waitForReady() = 0;
|
||||
virtual bool isReady() = 0;
|
||||
|
||||
inline bool hasNetwork(const uint64_t networkId) const
|
||||
{
|
||||
|
||||
@@ -551,7 +551,7 @@ unsigned int EmbeddedNetworkController::handleControlPlaneHttpGET(
|
||||
for(auto member=members.begin();member!=members.end();++member) {
|
||||
mid = (*member)["id"];
|
||||
char tmp[128];
|
||||
OSUtils::ztsnprintf(tmp,sizeof(tmp),"%s\"%s\":%llu",(responseBody.length() > 1) ? ",\"" : "\"",mid.c_str(),(unsigned long long)OSUtils::jsonInt((*member)["revision"],0));
|
||||
OSUtils::ztsnprintf(tmp,sizeof(tmp),"%s\"%s\":%llu",(responseBody.length() > 1) ? "," : "",mid.c_str(),(unsigned long long)OSUtils::jsonInt((*member)["revision"],0));
|
||||
responseBody.append(tmp);
|
||||
}
|
||||
}
|
||||
@@ -596,10 +596,11 @@ unsigned int EmbeddedNetworkController::handleControlPlaneHttpGET(
|
||||
// Controller status
|
||||
|
||||
char tmp[4096];
|
||||
OSUtils::ztsnprintf(tmp,sizeof(tmp),"{\n\t\"controller\": true,\n\t\"apiVersion\": %d,\n\t\"clock\": %llu\n}\n",ZT_NETCONF_CONTROLLER_API_VERSION,(unsigned long long)OSUtils::now());
|
||||
const bool dbOk = _db->isReady();
|
||||
OSUtils::ztsnprintf(tmp,sizeof(tmp),"{\n\t\"controller\": true,\n\t\"apiVersion\": %d,\n\t\"clock\": %llu,\n\t\"databaseReady\": %s\n}\n",ZT_NETCONF_CONTROLLER_API_VERSION,(unsigned long long)OSUtils::now(),dbOk ? "true" : "false");
|
||||
responseBody = tmp;
|
||||
responseContentType = "application/json";
|
||||
return 200;
|
||||
return dbOk ? 200 : 503;
|
||||
|
||||
}
|
||||
|
||||
|
||||
+25
-23
@@ -63,14 +63,10 @@ FileDB::FileDB(EmbeddedNetworkController *const nc,const Identity &myId,const ch
|
||||
}
|
||||
}
|
||||
|
||||
FileDB::~FileDB()
|
||||
{
|
||||
}
|
||||
FileDB::~FileDB() {}
|
||||
|
||||
bool FileDB::waitForReady()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
bool FileDB::waitForReady() { return true; }
|
||||
bool FileDB::isReady() { return true; }
|
||||
|
||||
void FileDB::save(nlohmann::json *orig,nlohmann::json &record)
|
||||
{
|
||||
@@ -91,13 +87,15 @@ void FileDB::save(nlohmann::json *orig,nlohmann::json &record)
|
||||
nlohmann::json old;
|
||||
get(nwid,old);
|
||||
|
||||
OSUtils::ztsnprintf(p1,sizeof(p1),"%s" ZT_PATH_SEPARATOR_S "%.16llx.json.new",_networksPath.c_str(),nwid);
|
||||
OSUtils::ztsnprintf(p2,sizeof(p2),"%s" ZT_PATH_SEPARATOR_S "%.16llx.json",_networksPath.c_str(),nwid);
|
||||
if (!OSUtils::writeFile(p1,OSUtils::jsonDump(record,-1)))
|
||||
fprintf(stderr,"WARNING: controller unable to write to path: %s" ZT_EOL_S,p1);
|
||||
OSUtils::rename(p1,p2);
|
||||
if ((!old.is_object())||(old != record)) {
|
||||
OSUtils::ztsnprintf(p1,sizeof(p1),"%s" ZT_PATH_SEPARATOR_S "%.16llx.json.new",_networksPath.c_str(),nwid);
|
||||
OSUtils::ztsnprintf(p2,sizeof(p2),"%s" ZT_PATH_SEPARATOR_S "%.16llx.json",_networksPath.c_str(),nwid);
|
||||
if (!OSUtils::writeFile(p1,OSUtils::jsonDump(record,-1)))
|
||||
fprintf(stderr,"WARNING: controller unable to write to path: %s" ZT_EOL_S,p1);
|
||||
OSUtils::rename(p1,p2);
|
||||
|
||||
_networkChanged(old,record,true);
|
||||
_networkChanged(old,record,true);
|
||||
}
|
||||
}
|
||||
} else if (objtype == "member") {
|
||||
const uint64_t id = OSUtils::jsonIntHex(record["id"],0ULL);
|
||||
@@ -106,17 +104,21 @@ void FileDB::save(nlohmann::json *orig,nlohmann::json &record)
|
||||
nlohmann::json network,old;
|
||||
get(nwid,network,id,old);
|
||||
|
||||
OSUtils::ztsnprintf(pb,sizeof(pb),"%s" ZT_PATH_SEPARATOR_S "%.16llx" ZT_PATH_SEPARATOR_S "member",_networksPath.c_str(),(unsigned long long)nwid);
|
||||
OSUtils::ztsnprintf(p1,sizeof(p1),"%s" ZT_PATH_SEPARATOR_S "%.10llx.json.new",pb,(unsigned long long)id);
|
||||
OSUtils::ztsnprintf(p2,sizeof(p2),"%s" ZT_PATH_SEPARATOR_S "%.10llx.json",pb,(unsigned long long)id);
|
||||
if (!OSUtils::writeFile(p1,OSUtils::jsonDump(record,-1))) {
|
||||
OSUtils::mkdir(pb);
|
||||
if (!OSUtils::writeFile(p1,OSUtils::jsonDump(record,-1)))
|
||||
fprintf(stderr,"WARNING: controller unable to write to path: %s" ZT_EOL_S,p1);
|
||||
}
|
||||
OSUtils::rename(p1,p2);
|
||||
if ((!old.is_object())||(old != record)) {
|
||||
OSUtils::ztsnprintf(pb,sizeof(pb),"%s" ZT_PATH_SEPARATOR_S "%.16llx" ZT_PATH_SEPARATOR_S "member",_networksPath.c_str(),(unsigned long long)nwid);
|
||||
OSUtils::ztsnprintf(p1,sizeof(p1),"%s" ZT_PATH_SEPARATOR_S "%.10llx.json.new",pb,(unsigned long long)id);
|
||||
if (!OSUtils::writeFile(p1,OSUtils::jsonDump(record,-1))) {
|
||||
OSUtils::ztsnprintf(p2,sizeof(p2),"%s" ZT_PATH_SEPARATOR_S "%.16llx",_networksPath.c_str(),(unsigned long long)nwid);
|
||||
OSUtils::mkdir(p2);
|
||||
OSUtils::mkdir(pb);
|
||||
if (!OSUtils::writeFile(p1,OSUtils::jsonDump(record,-1)))
|
||||
fprintf(stderr,"WARNING: controller unable to write to path: %s" ZT_EOL_S,p1);
|
||||
}
|
||||
OSUtils::ztsnprintf(p2,sizeof(p2),"%s" ZT_PATH_SEPARATOR_S "%.10llx.json",pb,(unsigned long long)id);
|
||||
OSUtils::rename(p1,p2);
|
||||
|
||||
_memberChanged(old,record,true);
|
||||
_memberChanged(old,record,true);
|
||||
}
|
||||
}
|
||||
} else if (objtype == "trace") {
|
||||
const std::string id = record["id"];
|
||||
|
||||
@@ -31,6 +31,7 @@ public:
|
||||
virtual ~FileDB();
|
||||
|
||||
virtual bool waitForReady();
|
||||
virtual bool isReady();
|
||||
virtual void save(nlohmann::json *orig,nlohmann::json &record);
|
||||
virtual void eraseNetwork(const uint64_t networkId);
|
||||
virtual void eraseMember(const uint64_t networkId,const uint64_t memberId);
|
||||
|
||||
@@ -263,9 +263,13 @@ RethinkDB::RethinkDB(EmbeddedNetworkController *const nc,const Identity &myId,co
|
||||
std::unique_ptr<R::Connection> rdb;
|
||||
while (_run == 1) {
|
||||
try {
|
||||
if (!rdb)
|
||||
if (!rdb) {
|
||||
_connected = 0;
|
||||
rdb = R::connect(this->_host,this->_port,this->_auth);
|
||||
}
|
||||
|
||||
if (rdb) {
|
||||
_connected = 1;
|
||||
R::Array batch;
|
||||
R::Object tmpobj;
|
||||
|
||||
@@ -434,6 +438,11 @@ bool RethinkDB::waitForReady()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RethinkDB::isReady()
|
||||
{
|
||||
return ((_ready)&&(_connected));
|
||||
}
|
||||
|
||||
void RethinkDB::save(nlohmann::json *orig,nlohmann::json &record)
|
||||
{
|
||||
if (!record.is_object()) // sanity check
|
||||
|
||||
@@ -41,6 +41,7 @@ public:
|
||||
virtual ~RethinkDB();
|
||||
|
||||
virtual bool waitForReady();
|
||||
virtual bool isReady();
|
||||
virtual void save(nlohmann::json *orig,nlohmann::json &record);
|
||||
virtual void eraseNetwork(const uint64_t networkId);
|
||||
virtual void eraseMember(const uint64_t networkId,const uint64_t memberId);
|
||||
@@ -72,8 +73,7 @@ protected:
|
||||
std::thread _heartbeatThread;
|
||||
|
||||
mutable std::mutex _readyLock; // locked until ready
|
||||
std::atomic<int> _ready;
|
||||
std::atomic<int> _run;
|
||||
std::atomic<int> _ready,_connected,_run;
|
||||
mutable volatile bool _waitNoticePrinted;
|
||||
};
|
||||
|
||||
|
||||
Vendored
+12
@@ -1,3 +1,15 @@
|
||||
zerotier-one (1.2.12) unstable; urgency=medium
|
||||
|
||||
* See https://github.com/zerotier/ZeroTierOne for release notes.
|
||||
|
||||
-- Adam Ierymenko <adam.ierymenko@zerotier.com> Tue, 25 Jul 2018 01:00:00 -0700
|
||||
|
||||
zerotier-one (1.2.10) unstable; urgency=medium
|
||||
|
||||
* See https://github.com/zerotier/ZeroTierOne for release notes.
|
||||
|
||||
-- Adam Ierymenko <adam.ierymenko@zerotier.com> Tue, 08 May 2018 01:00:00 -0700
|
||||
|
||||
zerotier-one (1.2.8) unstable; urgency=medium
|
||||
|
||||
* See https://github.com/zerotier/ZeroTierOne for release notes.
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
9
|
||||
8
|
||||
Vendored
+1
-1
@@ -3,7 +3,7 @@ Maintainer: Adam Ierymenko <adam.ierymenko@zerotier.com>
|
||||
Section: net
|
||||
Priority: optional
|
||||
Standards-Version: 3.9.6
|
||||
Build-Depends: debhelper (>= 9), dh-systemd
|
||||
Build-Depends: debhelper (>= 9)
|
||||
Vcs-Git: git://github.com/zerotier/ZeroTierOne
|
||||
Vcs-Browser: https://github.com/zerotier/ZeroTierOne
|
||||
Homepage: https://www.zerotier.com/
|
||||
|
||||
Vendored
+1
-1
@@ -3,7 +3,7 @@ Maintainer: Adam Ierymenko <adam.ierymenko@zerotier.com>
|
||||
Section: net
|
||||
Priority: optional
|
||||
Standards-Version: 3.9.4
|
||||
Build-Depends: debhelper (>= 9)
|
||||
Build-Depends: debhelper
|
||||
Vcs-Git: git://github.com/zerotier/ZeroTierOne
|
||||
Vcs-Browser: https://github.com/zerotier/ZeroTierOne
|
||||
Homepage: https://www.zerotier.com/
|
||||
|
||||
Vendored
+3
-1
@@ -2,7 +2,9 @@
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
adduser --system --group --home /var/lib/zerotier-one --no-create-home zerotier-one
|
||||
if ! id zerotier-one >>/dev/null 2>&1; then
|
||||
useradd --system --user-group --home-dir /var/lib/zerotier-one --no-create-home zerotier-one
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
Loaded 20 of 45 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user