diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-10 10:13:50 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-10 10:13:50 -0700 |
| commit | 5e331d673388f4fdc2eded418f63208dcaec63af (patch) | |
| tree | eb66a72702c4104b84b78a7e95639310c86d2092 /node/Switch.cpp | |
| parent | 068d311ecc7b52f1adaa894864afa54ef49a3e6e (diff) | |
| download | infinitytier-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.cpp | 3 |
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; |
