diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-07-28 11:32:34 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-07-28 11:32:34 -0700 |
commit | 17bfd4d55e96390147e2804b81c08985816ac4cd (patch) | |
tree | 75095f95f8c44649c10bfff4604aa9f6211c8c35 | |
parent | b31071463cafda54afbf6f01d37aa7451b217b12 (diff) | |
download | infinitytier-17bfd4d55e96390147e2804b81c08985816ac4cd.tar.gz infinitytier-17bfd4d55e96390147e2804b81c08985816ac4cd.zip |
Add TRACE for NAT-t debugging.
-rw-r--r-- | node/Switch.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/node/Switch.cpp b/node/Switch.cpp index a580078e..6f4659d5 100644 --- a/node/Switch.cpp +++ b/node/Switch.cpp @@ -399,8 +399,11 @@ void Switch::rendezvous(const SharedPtr<Peer> &peer,const InetAddress &atAddr) * packet first may actually close the remote's outgoing port to us! * This assists with NAT-t in cases where one side is symmetric and the * other is full cone but port restricted. */ - if ((atAddr.ss_family != AF_INET)||(!RR->sa->areGlobalIPv4PortsRandomized())) + if ((atAddr.ss_family != AF_INET)||(!RR->sa->areGlobalIPv4PortsRandomized())) { peer->attemptToContactAt(RR,atAddr,now); + } else { + TRACE("behind randomizing symmetric NAT -- delaying initial message to %s(%s)",peer->address().toString().c_str(),atAddr.toString().c_str()); + } // After 1s, try again and perhaps try more NAT-t strategies { |