From 5e331d673388f4fdc2eded418f63208dcaec63af Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 10 Apr 2015 10:13:50 -0700 Subject: Restrict unite() to desperation==0 since NAT-t only works right now with direct links. --- node/Switch.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'node/Switch.cpp') 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 cg(Peer::findCommonGround(*p1p,*p2p,now)); + // Right now we only unite desperation == 0 links, which will be direct + std::pair cg(Peer::findCommonGround(*p1p,*p2p,now,0)); if (!(cg.first)) return false; -- cgit v1.2.3