diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-14 13:56:28 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-14 13:56:28 -0700 |
commit | 1cfa67bbdd4242a52484f13f3533babb4d4c07a6 (patch) | |
tree | d772b3b7cc40371afaa494c4e623511133e0e33e /node | |
parent | a2605561af19d7de7ed492d1faf00d7ff161c6ea (diff) | |
download | infinitytier-1cfa67bbdd4242a52484f13f3533babb4d4c07a6.tar.gz infinitytier-1cfa67bbdd4242a52484f13f3533babb4d4c07a6.zip |
Bunch more control plane work, and shelve old UI -- React FTW.
Diffstat (limited to 'node')
-rw-r--r-- | node/Node.cpp | 3 | ||||
-rw-r--r-- | node/Peer.cpp | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/node/Node.cpp b/node/Node.cpp index be9eadfa..beb06430 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -357,12 +357,15 @@ ZT1_PeerList *Node::peers() const p->role = RR->topology->isSupernode(pi->second->address()) ? ZT1_PEER_ROLE_SUPERNODE : ZT1_PEER_ROLE_LEAF; std::vector<Path> paths(pi->second->paths()); + Path *bestPath = pi->second->getBestPath(_now); p->pathCount = 0; for(std::vector<Path>::iterator path(paths.begin());path!=paths.end();++path) { memcpy(&(p->paths[p->pathCount].address),&(path->address()),sizeof(struct sockaddr_storage)); p->paths[p->pathCount].lastSend = path->lastSend(); p->paths[p->pathCount].lastReceive = path->lastReceived(); p->paths[p->pathCount].fixed = path->fixed() ? 1 : 0; + p->paths[p->pathCount].active = path->active(_now) ? 1 : 0; + p->paths[p->pathCount].preferred = ((bestPath)&&(*path == *bestPath)) ? 1 : 0; ++p->pathCount; } } diff --git a/node/Peer.cpp b/node/Peer.cpp index 541fe5dd..4d942957 100644 --- a/node/Peer.cpp +++ b/node/Peer.cpp @@ -111,7 +111,7 @@ void Peer::received( * paths without confirming that a bidirectional link is in * fact present, but any packet that decodes and authenticates * correctly is considered valid. */ - TRACE("got non-confirmation packet from unknown path %s(%s), pinging...",_id.address().toString().c_str(),remoteAddr.toString().c_str()); + TRACE("got non-confirmation %s from unknown path %s(%s), pinging...",Packet::verbString(verb),_id.address().toString().c_str(),remoteAddr.toString().c_str()); attemptToContactAt(RR,remoteAddr,linkDesperation,now); } } |