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/Switch.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/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()) { |
