summaryrefslogtreecommitdiff
path: root/node/Switch.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-09-09 09:32:00 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-09-09 09:32:00 -0700
commitef8706995786f26df7bcb9f69b2a332419841964 (patch)
treed540d09e14a78a7066e6407e176d65f29716f00e /node/Switch.cpp
parent0d4109a9f1f119e336d73039251ad17c0e2a56f4 (diff)
downloadinfinitytier-ef8706995786f26df7bcb9f69b2a332419841964.tar.gz
infinitytier-ef8706995786f26df7bcb9f69b2a332419841964.zip
Fix gating of multicast GATHER replies since these can come from upstream, etc., and fix an issue with sending ECHO to recheck marginal paths.
Diffstat (limited to 'node/Switch.cpp')
-rw-r--r--node/Switch.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/node/Switch.cpp b/node/Switch.cpp
index f2a0d35b..ea92c99a 100644
--- a/node/Switch.cpp
+++ b/node/Switch.cpp
@@ -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) {