diff options
| author | Grant Limberg <glimberg@gmail.com> | 2016-07-14 19:29:10 -0700 |
|---|---|---|
| committer | Grant Limberg <glimberg@gmail.com> | 2016-07-14 19:29:10 -0700 |
| commit | 2afe3d89d00c0336db3e293d2e9dbd8d0e0083e7 (patch) | |
| tree | f07d029f5a76ac3cbea1ac92491e2cfa59391572 /node/Node.cpp | |
| parent | 8a15b42dabbacd522bfc7c2042591fa71692136c (diff) | |
| parent | bdc3b0834bb8abc621ee6dbc9a92769b57376bee (diff) | |
| download | infinitytier-2afe3d89d00c0336db3e293d2e9dbd8d0e0083e7.tar.gz infinitytier-2afe3d89d00c0336db3e293d2e9dbd8d0e0083e7.zip | |
Merge branch 'master' of http://git.int.zerotier.com/ZeroTier/ZeroTierOne
Diffstat (limited to 'node/Node.cpp')
| -rw-r--r-- | node/Node.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/node/Node.cpp b/node/Node.cpp index bedbba94..13085028 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -447,6 +447,7 @@ ZT_PeerList *Node::peers() const p->paths[p->pathCount].lastReceive = path->lastReceived(); p->paths[p->pathCount].active = path->active(_now) ? 1 : 0; p->paths[p->pathCount].preferred = ((bestPath)&&(*path == *bestPath)) ? 1 : 0; + p->paths[p->pathCount].trustedPathId = RR->topology->getOutboundPathTrust(path->address()); ++p->pathCount; } } @@ -745,6 +746,11 @@ void Node::postCircuitTestReport(const ZT_CircuitTestReport *report) (reinterpret_cast<void (*)(ZT_Node *,ZT_CircuitTest *,const ZT_CircuitTestReport *)>((*i)->_internalPtr))(reinterpret_cast<ZT_Node *>(this),*i,report); } +void Node::setTrustedPaths(const struct sockaddr_storage *networks,const uint64_t *ids,unsigned int count) +{ + RR->topology->setTrustedPaths(reinterpret_cast<const InetAddress *>(networks),ids,count); +} + } // namespace ZeroTier /****************************************************************************/ @@ -1014,6 +1020,13 @@ void ZT_Node_clusterStatus(ZT_Node *node,ZT_ClusterStatus *cs) } catch ( ... ) {} } +void ZT_Node_setTrustedPaths(ZT_Node *node,const struct sockaddr_storage *networks,const uint64_t *ids,unsigned int count) +{ + try { + reinterpret_cast<ZeroTier::Node *>(node)->setTrustedPaths(networks,ids,count); + } catch ( ... ) {} +} + void ZT_Node_backgroundThreadMain(ZT_Node *node) { try { |
