summaryrefslogtreecommitdiff
path: root/node/Switch.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-04-10 10:13:50 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-04-10 10:13:50 -0700
commit5e331d673388f4fdc2eded418f63208dcaec63af (patch)
treeeb66a72702c4104b84b78a7e95639310c86d2092 /node/Switch.cpp
parent068d311ecc7b52f1adaa894864afa54ef49a3e6e (diff)
downloadinfinitytier-5e331d673388f4fdc2eded418f63208dcaec63af.tar.gz
infinitytier-5e331d673388f4fdc2eded418f63208dcaec63af.zip
Restrict unite() to desperation==0 since NAT-t only works right now with direct links.
Diffstat (limited to 'node/Switch.cpp')
-rw-r--r--node/Switch.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/node/Switch.cpp b/node/Switch.cpp
index caeb3e3a..3710158d 100644
--- a/node/Switch.cpp
+++ b/node/Switch.cpp
@@ -289,7 +289,8 @@ bool Switch::unite(const Address &p1,const Address &p2,bool force)
const uint64_t now = RR->node->now();
- std::pair<InetAddress,InetAddress> cg(Peer::findCommonGround(*p1p,*p2p,now));
+ // Right now we only unite desperation == 0 links, which will be direct
+ std::pair<InetAddress,InetAddress> cg(Peer::findCommonGround(*p1p,*p2p,now,0));
if (!(cg.first))
return false;