diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-07-12 08:29:50 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-07-12 08:29:50 -0700 |
| commit | 765082fdb68d8847cbd53cb442cbed5006b28d5f (patch) | |
| tree | 88a6de909ef66218422ead9e69ad0ef7dc7a53e4 /node/Switch.cpp | |
| parent | aff62e9e10c164c005f7b4f9bc78b50c2c6fcca1 (diff) | |
| download | infinitytier-765082fdb68d8847cbd53cb442cbed5006b28d5f.tar.gz infinitytier-765082fdb68d8847cbd53cb442cbed5006b28d5f.zip | |
Trusted path support, and version bump to 1.1.9
Diffstat (limited to 'node/Switch.cpp')
| -rw-r--r-- | node/Switch.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/node/Switch.cpp b/node/Switch.cpp index b134cc69..bf3afe33 100644 --- a/node/Switch.cpp +++ b/node/Switch.cpp @@ -849,7 +849,12 @@ bool Switch::_trySend(const Packet &packet,bool encrypt,uint64_t nwid) unsigned int chunkSize = std::min(tmp.size(),(unsigned int)ZT_UDP_DEFAULT_PAYLOAD_MTU); tmp.setFragmented(chunkSize < tmp.size()); - tmp.armor(peer->key(),encrypt); + const uint64_t trustedPathId = RR->topology->getOutboundPathTrust(viaPath->address()); + if (trustedPathId) { + tmp.setTrusted(trustedPathId); + } else { + tmp.armor(peer->key(),encrypt); + } if (viaPath->send(RR,tmp.data(),chunkSize,now)) { if (chunkSize < tmp.size()) { |
