summaryrefslogtreecommitdiff
path: root/node/Node.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2017-03-01 14:36:52 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2017-03-01 14:36:52 -0800
commit1d39be61b267a85adebeee9e979bd1d84f55da3c (patch)
tree2fa5efbe2406a9a60686c1de422ff2c574802ba5 /node/Node.cpp
parent2bf9145ae65385bf968542619ffcf204cf6241d8 (diff)
downloadinfinitytier-1d39be61b267a85adebeee9e979bd1d84f55da3c.tar.gz
infinitytier-1d39be61b267a85adebeee9e979bd1d84f55da3c.zip
ZeroTier now has link quality measurement. We are not using this yet but decided to put it in to prep for future QoS support and SD-WAN stuff.
Diffstat (limited to 'node/Node.cpp')
-rw-r--r--node/Node.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/node/Node.cpp b/node/Node.cpp
index 35940d27..a75a56b4 100644
--- a/node/Node.cpp
+++ b/node/Node.cpp
@@ -401,9 +401,10 @@ ZT_PeerList *Node::peers() const
memcpy(&(p->paths[p->pathCount].address),&(path->first->address()),sizeof(struct sockaddr_storage));
p->paths[p->pathCount].lastSend = path->first->lastOut();
p->paths[p->pathCount].lastReceive = path->first->lastIn();
+ p->paths[p->pathCount].trustedPathId = RR->topology->getOutboundPathTrust(path->first->address());
+ p->paths[p->pathCount].linkQuality = (int)path->first->linkQuality();
p->paths[p->pathCount].expired = path->second;
p->paths[p->pathCount].preferred = (path->first == bestp) ? 1 : 0;
- p->paths[p->pathCount].trustedPathId = RR->topology->getOutboundPathTrust(path->first->address());
++p->pathCount;
}
}