Fix gating of multicast GATHER replies since these can come from upstream, etc., and fix an issue with sending ECHO to recheck marginal paths.
This commit is contained in:
parent
0d4109a9f1
commit
ef87069957
5 changed files with 27 additions and 7 deletions
|
@ -759,11 +759,8 @@ bool Switch::_trySend(const Packet &packet,bool encrypt)
|
|||
|
||||
SharedPtr<Path> viaPath(peer->getBestPath(now,false));
|
||||
if ( (viaPath) && (!viaPath->alive(now)) && (!RR->topology->isRoot(peer->identity())) ) {
|
||||
if ((now - viaPath->lastOut()) > std::max((now - viaPath->lastIn()) >> 2,(uint64_t)ZT_PATH_MIN_REACTIVATE_INTERVAL)) {
|
||||
Packet outp(peer->address(),RR->identity.address(),Packet::VERB_ECHO);
|
||||
outp.armor(peer->key(),true);
|
||||
viaPath->send(RR,outp.data(),outp.size(),now);
|
||||
}
|
||||
if ((now - viaPath->lastOut()) > std::max((now - viaPath->lastIn()) * 4,(uint64_t)ZT_PATH_MIN_REACTIVATE_INTERVAL))
|
||||
peer->attemptToContactAt(viaPath->localAddress(),viaPath->address(),now);
|
||||
viaPath.zero();
|
||||
}
|
||||
if (!viaPath) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue