Harden PUSH_DIRECT_PATHS and simplify things by only doing it on receive when hops>0 and trust has been established.

This commit is contained in:
Adam Ierymenko 2016-08-24 16:16:39 -07:00
parent 63e8ad4cc3
commit c476285bd6
4 changed files with 135 additions and 137 deletions

View file

@ -761,11 +761,6 @@ bool Switch::_trySend(const Packet &packet,bool encrypt)
return false;
}
if (relay) {
peer->pushDirectPaths(viaPath->localAddress(),viaPath->address(),now,false);
viaPath->sent(now);
}
Packet tmp(packet);
unsigned int chunkSize = std::min(tmp.size(),(unsigned int)ZT_UDP_DEFAULT_PAYLOAD_MTU);