diff options
Diffstat (limited to 'node/Switch.cpp')
-rw-r--r-- | node/Switch.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/node/Switch.cpp b/node/Switch.cpp index dcaf7ebd..74e2f4c6 100644 --- a/node/Switch.cpp +++ b/node/Switch.cpp @@ -435,7 +435,7 @@ void Switch::rendezvous(const SharedPtr<Peer> &peer,const InetAddress &localAddr { TRACE("sending NAT-t message to %s(%s)",peer->address().toString().c_str(),atAddr.toString().c_str()); const uint64_t now = RR->node->now(); - peer->sendHELLO(RR,localAddr,atAddr,now); + peer->sendHELLO(RR,localAddr,atAddr,now,2); // first attempt: send low-TTL packet to 'open' local NAT { Mutex::Lock _l(_contactQueue_m); _contactQueue.push_back(ContactQueueEntry(peer,now + ZT_NAT_T_TACTICAL_ESCALATION_DELAY,localAddr,atAddr)); @@ -509,8 +509,8 @@ unsigned long Switch::doTimerTasks(uint64_t now) if (qi->strategyIteration == 0) { // First strategy: send packet directly to destination qi->peer->sendHELLO(RR,qi->localAddr,qi->inaddr,now); - } else if (qi->strategyIteration <= 4) { - // Strategies 1-4: try escalating ports for symmetric NATs that remap sequentially + } else if (qi->strategyIteration <= 3) { + // Strategies 1-3: try escalating ports for symmetric NATs that remap sequentially InetAddress tmpaddr(qi->inaddr); int p = (int)qi->inaddr.port() + qi->strategyIteration; if (p < 0xffff) { |