Peer.cpp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551
  1. /*
  2. * ZeroTier One - Network Virtualization Everywhere
  3. * Copyright (C) 2011-2016 ZeroTier, Inc. https://www.zerotier.com/
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #include "../version.h"
  19. #include "Constants.hpp"
  20. #include "Peer.hpp"
  21. #include "Node.hpp"
  22. #include "Switch.hpp"
  23. #include "Network.hpp"
  24. #include "SelfAwareness.hpp"
  25. #include "Cluster.hpp"
  26. #include "Packet.hpp"
  27. #include <algorithm>
  28. #define ZT_PEER_PATH_SORT_INTERVAL 5000
  29. namespace ZeroTier {
  30. // Used to send varying values for NAT keepalive
  31. static uint32_t _natKeepaliveBuf = 0;
  32. Peer::Peer(const RuntimeEnvironment *renv,const Identity &myIdentity,const Identity &peerIdentity) :
  33. RR(renv),
  34. _lastUsed(0),
  35. _lastReceive(0),
  36. _lastUnicastFrame(0),
  37. _lastMulticastFrame(0),
  38. _lastAnnouncedTo(0),
  39. _lastDirectPathPushSent(0),
  40. _lastDirectPathPushReceive(0),
  41. _lastPathSort(0),
  42. _vProto(0),
  43. _vMajor(0),
  44. _vMinor(0),
  45. _vRevision(0),
  46. _id(peerIdentity),
  47. _numPaths(0),
  48. _latency(0),
  49. _directPathPushCutoffCount(0),
  50. _networkComs(4),
  51. _lastPushedComs(4)
  52. {
  53. if (!myIdentity.agree(peerIdentity,_key,ZT_PEER_SECRET_KEY_LENGTH))
  54. throw std::runtime_error("new peer identity key agreement failed");
  55. }
  56. void Peer::received(
  57. const InetAddress &localAddr,
  58. const InetAddress &remoteAddr,
  59. unsigned int hops,
  60. uint64_t packetId,
  61. Packet::Verb verb,
  62. uint64_t inRePacketId,
  63. Packet::Verb inReVerb)
  64. {
  65. #ifdef ZT_ENABLE_CLUSTER
  66. bool suboptimalPath = false;
  67. if ((RR->cluster)&&(hops == 0)) {
  68. // Note: findBetterEndpoint() is first since we still want to check
  69. // for a better endpoint even if we don't actually send a redirect.
  70. InetAddress redirectTo;
  71. if ( (RR->cluster->findBetterEndpoint(redirectTo,_id.address(),remoteAddr,false)) && (verb != Packet::VERB_OK)&&(verb != Packet::VERB_ERROR)&&(verb != Packet::VERB_RENDEZVOUS)&&(verb != Packet::VERB_PUSH_DIRECT_PATHS) ) {
  72. if (_vProto >= 5) {
  73. // For newer peers we can send a more idiomatic verb: PUSH_DIRECT_PATHS.
  74. Packet outp(_id.address(),RR->identity.address(),Packet::VERB_PUSH_DIRECT_PATHS);
  75. outp.append((uint16_t)1); // count == 1
  76. outp.append((uint8_t)ZT_PUSH_DIRECT_PATHS_FLAG_CLUSTER_REDIRECT); // flags: cluster redirect
  77. outp.append((uint16_t)0); // no extensions
  78. if (redirectTo.ss_family == AF_INET) {
  79. outp.append((uint8_t)4);
  80. outp.append((uint8_t)6);
  81. outp.append(redirectTo.rawIpData(),4);
  82. } else {
  83. outp.append((uint8_t)6);
  84. outp.append((uint8_t)18);
  85. outp.append(redirectTo.rawIpData(),16);
  86. }
  87. outp.append((uint16_t)redirectTo.port());
  88. outp.armor(_key,true);
  89. RR->node->putPacket(localAddr,remoteAddr,outp.data(),outp.size());
  90. } else {
  91. // For older peers we use RENDEZVOUS to coax them into contacting us elsewhere.
  92. Packet outp(_id.address(),RR->identity.address(),Packet::VERB_RENDEZVOUS);
  93. outp.append((uint8_t)0); // no flags
  94. RR->identity.address().appendTo(outp);
  95. outp.append((uint16_t)redirectTo.port());
  96. if (redirectTo.ss_family == AF_INET) {
  97. outp.append((uint8_t)4);
  98. outp.append(redirectTo.rawIpData(),4);
  99. } else {
  100. outp.append((uint8_t)16);
  101. outp.append(redirectTo.rawIpData(),16);
  102. }
  103. outp.armor(_key,true);
  104. RR->node->putPacket(localAddr,remoteAddr,outp.data(),outp.size());
  105. }
  106. suboptimalPath = true;
  107. }
  108. }
  109. #endif
  110. const uint64_t now = RR->node->now();
  111. _lastReceive = now;
  112. if ((verb == Packet::VERB_FRAME)||(verb == Packet::VERB_EXT_FRAME))
  113. _lastUnicastFrame = now;
  114. else if (verb == Packet::VERB_MULTICAST_FRAME)
  115. _lastMulticastFrame = now;
  116. if (hops == 0) {
  117. bool pathIsConfirmed = false;
  118. unsigned int np = _numPaths;
  119. for(unsigned int p=0;p<np;++p) {
  120. if ((_paths[p].address() == remoteAddr)&&(_paths[p].localAddress() == localAddr)) {
  121. _paths[p].received(now);
  122. #ifdef ZT_ENABLE_CLUSTER
  123. _paths[p].setClusterSuboptimal(suboptimalPath);
  124. #endif
  125. pathIsConfirmed = true;
  126. break;
  127. }
  128. }
  129. if ((!pathIsConfirmed)&&(RR->node->shouldUsePathForZeroTierTraffic(localAddr,remoteAddr))) {
  130. if (verb == Packet::VERB_OK) {
  131. Path *slot = (Path *)0;
  132. if (np < ZT_MAX_PEER_NETWORK_PATHS) {
  133. slot = &(_paths[np++]);
  134. } else {
  135. uint64_t slotWorstScore = 0xffffffffffffffffULL;
  136. for(unsigned int p=0;p<ZT_MAX_PEER_NETWORK_PATHS;++p) {
  137. if (!_paths[p].active(now)) {
  138. slot = &(_paths[p]);
  139. break;
  140. } else {
  141. const uint64_t score = _paths[p].score();
  142. if (score <= slotWorstScore) {
  143. slotWorstScore = score;
  144. slot = &(_paths[p]);
  145. }
  146. }
  147. }
  148. }
  149. if (slot) {
  150. *slot = Path(localAddr,remoteAddr);
  151. slot->received(now);
  152. #ifdef ZT_ENABLE_CLUSTER
  153. slot->setClusterSuboptimal(suboptimalPath);
  154. #endif
  155. _numPaths = np;
  156. }
  157. #ifdef ZT_ENABLE_CLUSTER
  158. if (RR->cluster)
  159. RR->cluster->broadcastHavePeer(_id);
  160. #endif
  161. } else {
  162. TRACE("got %s via unknown path %s(%s), confirming...",Packet::verbString(verb),_id.address().toString().c_str(),remoteAddr.toString().c_str());
  163. if ( (_vProto >= 5) && ( !((_vMajor == 1)&&(_vMinor == 1)&&(_vRevision == 0)) ) ) {
  164. Packet outp(_id.address(),RR->identity.address(),Packet::VERB_ECHO);
  165. outp.armor(_key,true);
  166. RR->node->putPacket(localAddr,remoteAddr,outp.data(),outp.size());
  167. } else {
  168. sendHELLO(localAddr,remoteAddr,now);
  169. }
  170. }
  171. }
  172. }
  173. if ((now - _lastAnnouncedTo) >= ((ZT_MULTICAST_LIKE_EXPIRE / 2) - 1000)) {
  174. _lastAnnouncedTo = now;
  175. const std::vector< SharedPtr<Network> > networks(RR->node->allNetworks());
  176. for(std::vector< SharedPtr<Network> >::const_iterator n(networks.begin());n!=networks.end();++n)
  177. (*n)->tryAnnounceMulticastGroupsTo(SharedPtr<Peer>(this));
  178. }
  179. }
  180. void Peer::sendHELLO(const InetAddress &localAddr,const InetAddress &atAddress,uint64_t now,unsigned int ttl)
  181. {
  182. Packet outp(_id.address(),RR->identity.address(),Packet::VERB_HELLO);
  183. outp.append((unsigned char)ZT_PROTO_VERSION);
  184. outp.append((unsigned char)ZEROTIER_ONE_VERSION_MAJOR);
  185. outp.append((unsigned char)ZEROTIER_ONE_VERSION_MINOR);
  186. outp.append((uint16_t)ZEROTIER_ONE_VERSION_REVISION);
  187. outp.append(now);
  188. RR->identity.serialize(outp,false);
  189. atAddress.serialize(outp);
  190. outp.append((uint64_t)RR->topology->worldId());
  191. outp.append((uint64_t)RR->topology->worldTimestamp());
  192. outp.armor(_key,false); // HELLO is sent in the clear
  193. RR->node->putPacket(localAddr,atAddress,outp.data(),outp.size(),ttl);
  194. }
  195. bool Peer::doPingAndKeepalive(uint64_t now,int inetAddressFamily)
  196. {
  197. Path *p = (Path *)0;
  198. if (inetAddressFamily != 0) {
  199. p = _getBestPath(now,inetAddressFamily);
  200. } else {
  201. p = _getBestPath(now);
  202. }
  203. if (p) {
  204. if ((now - p->lastReceived()) >= ZT_PEER_DIRECT_PING_DELAY) {
  205. //TRACE("PING %s(%s) after %llums/%llums send/receive inactivity",_id.address().toString().c_str(),p->address().toString().c_str(),now - p->lastSend(),now - p->lastReceived());
  206. sendHELLO(p->localAddress(),p->address(),now);
  207. p->sent(now);
  208. p->pinged(now);
  209. } else if ( ((now - std::max(p->lastSend(),p->lastKeepalive())) >= ZT_NAT_KEEPALIVE_DELAY) && (!p->reliable()) ) {
  210. //TRACE("NAT keepalive %s(%s) after %llums/%llums send/receive inactivity",_id.address().toString().c_str(),p->address().toString().c_str(),now - p->lastSend(),now - p->lastReceived());
  211. _natKeepaliveBuf += (uint32_t)((now * 0x9e3779b1) >> 1); // tumble this around to send constantly varying (meaningless) payloads
  212. RR->node->putPacket(p->localAddress(),p->address(),&_natKeepaliveBuf,sizeof(_natKeepaliveBuf));
  213. p->sentKeepalive(now);
  214. } else {
  215. //TRACE("no PING or NAT keepalive: addr==%s reliable==%d %llums/%llums send/receive inactivity",p->address().toString().c_str(),(int)p->reliable(),now - p->lastSend(),now - p->lastReceived());
  216. }
  217. return true;
  218. }
  219. return false;
  220. }
  221. bool Peer::pushDirectPaths(const InetAddress &localAddr,const InetAddress &toAddress,uint64_t now,bool force)
  222. {
  223. #ifdef ZT_ENABLE_CLUSTER
  224. // Cluster mode disables normal PUSH_DIRECT_PATHS in favor of cluster-based peer redirection
  225. if (RR->cluster)
  226. return false;
  227. #endif
  228. if (!force) {
  229. if ((now - _lastDirectPathPushSent) < ZT_DIRECT_PATH_PUSH_INTERVAL)
  230. return false;
  231. else _lastDirectPathPushSent = now;
  232. }
  233. std::vector<InetAddress> dps(RR->node->directPaths());
  234. std::vector<InetAddress> sym(RR->sa->getSymmetricNatPredictions());
  235. for(unsigned long i=0,added=0;i<sym.size();++i) {
  236. InetAddress tmp(sym[(unsigned long)RR->node->prng() % sym.size()]);
  237. if (std::find(dps.begin(),dps.end(),tmp) == dps.end()) {
  238. dps.push_back(tmp);
  239. if (++added >= ZT_PUSH_DIRECT_PATHS_MAX_PER_SCOPE_AND_FAMILY)
  240. break;
  241. }
  242. }
  243. if (dps.empty())
  244. return false;
  245. #ifdef ZT_TRACE
  246. {
  247. std::string ps;
  248. for(std::vector<InetAddress>::const_iterator p(dps.begin());p!=dps.end();++p) {
  249. if (ps.length() > 0)
  250. ps.push_back(',');
  251. ps.append(p->toString());
  252. }
  253. TRACE("pushing %u direct paths to %s: %s",(unsigned int)dps.size(),_id.address().toString().c_str(),ps.c_str());
  254. }
  255. #endif
  256. std::vector<InetAddress>::const_iterator p(dps.begin());
  257. while (p != dps.end()) {
  258. Packet outp(_id.address(),RR->identity.address(),Packet::VERB_PUSH_DIRECT_PATHS);
  259. outp.addSize(2); // leave room for count
  260. unsigned int count = 0;
  261. while ((p != dps.end())&&((outp.size() + 24) < 1200)) {
  262. uint8_t addressType = 4;
  263. switch(p->ss_family) {
  264. case AF_INET:
  265. break;
  266. case AF_INET6:
  267. addressType = 6;
  268. break;
  269. default: // we currently only push IP addresses
  270. ++p;
  271. continue;
  272. }
  273. outp.append((uint8_t)0); // no flags
  274. outp.append((uint16_t)0); // no extensions
  275. outp.append(addressType);
  276. outp.append((uint8_t)((addressType == 4) ? 6 : 18));
  277. outp.append(p->rawIpData(),((addressType == 4) ? 4 : 16));
  278. outp.append((uint16_t)p->port());
  279. ++count;
  280. ++p;
  281. }
  282. if (count) {
  283. outp.setAt(ZT_PACKET_IDX_PAYLOAD,(uint16_t)count);
  284. outp.armor(_key,true);
  285. RR->node->putPacket(localAddr,toAddress,outp.data(),outp.size(),0);
  286. }
  287. }
  288. return true;
  289. }
  290. bool Peer::resetWithinScope(InetAddress::IpScope scope,uint64_t now)
  291. {
  292. unsigned int np = _numPaths;
  293. unsigned int x = 0;
  294. unsigned int y = 0;
  295. while (x < np) {
  296. if (_paths[x].address().ipScope() == scope) {
  297. // Resetting a path means sending a HELLO and then forgetting it. If we
  298. // get OK(HELLO) then it will be re-learned.
  299. sendHELLO(_paths[x].localAddress(),_paths[x].address(),now);
  300. } else {
  301. _paths[y++] = _paths[x];
  302. }
  303. ++x;
  304. }
  305. _numPaths = y;
  306. return (y < np);
  307. }
  308. void Peer::getBestActiveAddresses(uint64_t now,InetAddress &v4,InetAddress &v6) const
  309. {
  310. uint64_t bestV4 = 0,bestV6 = 0;
  311. for(unsigned int p=0,np=_numPaths;p<np;++p) {
  312. if (_paths[p].active(now)) {
  313. uint64_t lr = _paths[p].lastReceived();
  314. if (lr) {
  315. if (_paths[p].address().isV4()) {
  316. if (lr >= bestV4) {
  317. bestV4 = lr;
  318. v4 = _paths[p].address();
  319. }
  320. } else if (_paths[p].address().isV6()) {
  321. if (lr >= bestV6) {
  322. bestV6 = lr;
  323. v6 = _paths[p].address();
  324. }
  325. }
  326. }
  327. }
  328. }
  329. }
  330. bool Peer::networkMembershipCertificatesAgree(uint64_t nwid,const CertificateOfMembership &com) const
  331. {
  332. Mutex::Lock _l(_networkComs_m);
  333. const _NetworkCom *ourCom = _networkComs.get(nwid);
  334. if (ourCom)
  335. return ourCom->com.agreesWith(com);
  336. return false;
  337. }
  338. bool Peer::validateAndSetNetworkMembershipCertificate(uint64_t nwid,const CertificateOfMembership &com)
  339. {
  340. // Sanity checks
  341. if ((!com)||(com.issuedTo() != _id.address()))
  342. return false;
  343. // Return true if we already have this *exact* COM
  344. {
  345. Mutex::Lock _l(_networkComs_m);
  346. _NetworkCom *ourCom = _networkComs.get(nwid);
  347. if ((ourCom)&&(ourCom->com == com))
  348. return true;
  349. }
  350. // Check signature, log and return if cert is invalid
  351. if (com.signedBy() != Network::controllerFor(nwid)) {
  352. TRACE("rejected network membership certificate for %.16llx signed by %s: signer not a controller of this network",(unsigned long long)nwid,com.signedBy().toString().c_str());
  353. return false; // invalid signer
  354. }
  355. if (com.signedBy() == RR->identity.address()) {
  356. // We are the controller: RR->identity.address() == controller() == cert.signedBy()
  357. // So, verify that we signed th cert ourself
  358. if (!com.verify(RR->identity)) {
  359. TRACE("rejected network membership certificate for %.16llx self signed by %s: signature check failed",(unsigned long long)nwid,com.signedBy().toString().c_str());
  360. return false; // invalid signature
  361. }
  362. } else {
  363. SharedPtr<Peer> signer(RR->topology->getPeer(com.signedBy()));
  364. if (!signer) {
  365. // This would be rather odd, since this is our controller... could happen
  366. // if we get packets before we've gotten config.
  367. RR->sw->requestWhois(com.signedBy());
  368. return false; // signer unknown
  369. }
  370. if (!com.verify(signer->identity())) {
  371. TRACE("rejected network membership certificate for %.16llx signed by %s: signature check failed",(unsigned long long)nwid,com.signedBy().toString().c_str());
  372. return false; // invalid signature
  373. }
  374. }
  375. // If we made it past all those checks, add or update cert in our cert info store
  376. {
  377. Mutex::Lock _l(_networkComs_m);
  378. _networkComs.set(nwid,_NetworkCom(RR->node->now(),com));
  379. }
  380. return true;
  381. }
  382. bool Peer::needsOurNetworkMembershipCertificate(uint64_t nwid,uint64_t now,bool updateLastPushedTime)
  383. {
  384. Mutex::Lock _l(_networkComs_m);
  385. uint64_t &lastPushed = _lastPushedComs[nwid];
  386. const uint64_t tmp = lastPushed;
  387. if (updateLastPushedTime)
  388. lastPushed = now;
  389. return ((now - tmp) >= (ZT_NETWORK_AUTOCONF_DELAY / 3));
  390. }
  391. void Peer::clean(uint64_t now)
  392. {
  393. {
  394. unsigned int np = _numPaths;
  395. unsigned int x = 0;
  396. unsigned int y = 0;
  397. while (x < np) {
  398. if (_paths[x].active(now))
  399. _paths[y++] = _paths[x];
  400. ++x;
  401. }
  402. _numPaths = y;
  403. }
  404. {
  405. Mutex::Lock _l(_networkComs_m);
  406. {
  407. uint64_t *k = (uint64_t *)0;
  408. _NetworkCom *v = (_NetworkCom *)0;
  409. Hashtable< uint64_t,_NetworkCom >::Iterator i(_networkComs);
  410. while (i.next(k,v)) {
  411. if ( (!RR->node->belongsToNetwork(*k)) && ((now - v->ts) >= ZT_PEER_NETWORK_COM_EXPIRATION) )
  412. _networkComs.erase(*k);
  413. }
  414. }
  415. {
  416. uint64_t *k = (uint64_t *)0;
  417. uint64_t *v = (uint64_t *)0;
  418. Hashtable< uint64_t,uint64_t >::Iterator i(_lastPushedComs);
  419. while (i.next(k,v)) {
  420. if ((now - *v) > (ZT_NETWORK_AUTOCONF_DELAY * 2))
  421. _lastPushedComs.erase(*k);
  422. }
  423. }
  424. }
  425. }
  426. bool Peer::_checkPath(Path &p,const uint64_t now)
  427. {
  428. if (!p.active(now))
  429. return false;
  430. /* Dead path detection: if we have sent something to this peer and have not
  431. * yet received a reply, double check this path. The majority of outbound
  432. * packets including Ethernet frames do generate some kind of reply either
  433. * immediately or at some point in the near future. This will occasionally
  434. * (every NO_ANSWER_TIMEOUT ms) check paths unnecessarily if traffic that
  435. * does not generate a response is being sent such as multicast announcements
  436. * or frames belonging to unidirectional UDP protocols, but the cost is very
  437. * tiny and the benefit in reliability is very large. This takes care of many
  438. * failure modes including crap NATs that forget links and spurious changes
  439. * to physical network topology that cannot be otherwise detected.
  440. *
  441. * Each time we do this we increment a probation counter in the path. This
  442. * counter is reset on any packet receive over this path. If it reaches the
  443. * MAX_PROBATION threshold the path is considred dead. */
  444. if (
  445. (p.lastSend() > p.lastReceived()) &&
  446. ((p.lastSend() - p.lastReceived()) >= ZT_PEER_DEAD_PATH_DETECTION_NO_ANSWER_TIMEOUT) &&
  447. ((now - p.lastPing()) >= ZT_PEER_DEAD_PATH_DETECTION_NO_ANSWER_TIMEOUT) &&
  448. (!RR->topology->amRoot())
  449. ) {
  450. TRACE("%s(%s) does not seem to be answering in a timely manner, checking if dead (probation == %u)",_id.address().toString().c_str(),p.address().toString().c_str(),p.probation());
  451. if ( (_vProto >= 5) && ( !((_vMajor == 1)&&(_vMinor == 1)&&(_vRevision == 0)) ) ) {
  452. Packet outp(_id.address(),RR->identity.address(),Packet::VERB_ECHO);
  453. outp.armor(_key,true);
  454. p.send(RR,outp.data(),outp.size(),now);
  455. p.pinged(now);
  456. } else {
  457. sendHELLO(p.localAddress(),p.address(),now);
  458. p.sent(now);
  459. p.pinged(now);
  460. }
  461. p.increaseProbation();
  462. }
  463. return true;
  464. }
  465. Path *Peer::_getBestPath(const uint64_t now)
  466. {
  467. Path *bestPath = (Path *)0;
  468. uint64_t bestPathScore = 0;
  469. for(unsigned int i=0;i<_numPaths;++i) {
  470. const uint64_t score = _paths[i].score();
  471. if ((score >= bestPathScore)&&(_checkPath(_paths[i],now))) {
  472. bestPathScore = score;
  473. bestPath = &(_paths[i]);
  474. }
  475. }
  476. return bestPath;
  477. }
  478. Path *Peer::_getBestPath(const uint64_t now,int inetAddressFamily)
  479. {
  480. Path *bestPath = (Path *)0;
  481. uint64_t bestPathScore = 0;
  482. for(unsigned int i=0;i<_numPaths;++i) {
  483. const uint64_t score = _paths[i].score();
  484. if (((int)_paths[i].address().ss_family == inetAddressFamily)&&(score >= bestPathScore)&&(_checkPath(_paths[i],now))) {
  485. bestPathScore = score;
  486. bestPath = &(_paths[i]);
  487. }
  488. }
  489. return bestPath;
  490. }
  491. } // namespace ZeroTier