summaryrefslogtreecommitdiff
path: root/node/Peer.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-07-27 17:28:13 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-07-27 17:28:13 -0700
commite99eda4a4a178bbdbb419791587b581431061439 (patch)
tree86762d7ffccc1cdadd91b2744fa3bf7bacebc8b4 /node/Peer.cpp
parentfadb2919625f72b7f0fbff17478ac467a86e657b (diff)
downloadinfinitytier-e99eda4a4a178bbdbb419791587b581431061439.tar.gz
infinitytier-e99eda4a4a178bbdbb419791587b581431061439.zip
Fix IP scoping bug, and disable remotely reported surface push... not helping. :(
Diffstat (limited to 'node/Peer.cpp')
-rw-r--r--node/Peer.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/node/Peer.cpp b/node/Peer.cpp
index 804e6e39..ab3d61a6 100644
--- a/node/Peer.cpp
+++ b/node/Peer.cpp
@@ -226,15 +226,13 @@ void Peer::doPingAndKeepalive(const RuntimeEnvironment *RR,uint64_t now)
void Peer::pushDirectPaths(const RuntimeEnvironment *RR,RemotePath *path,uint64_t now,bool force)
{
- if ((((now - _lastDirectPathPush) >= ZT_DIRECT_PATH_PUSH_INTERVAL)||(force))) {
+ if ((true)||(((now - _lastDirectPathPush) >= ZT_DIRECT_PATH_PUSH_INTERVAL)||(force))) {
_lastDirectPathPush = now;
std::vector<Path> dps(RR->node->directPaths());
- /* Also push paths reported to us by non-root-server peers. This assists
- * with NAT traversal behind NATs that engage in strange or randomized
- * port assignment behavior. */
- std::vector<Address> rootAddresses(RR->topology->rootAddresses());
+ // Push peer-reported surface -- tried this and it didn't help much with difficult NATs so commenting out.
+ /*
std::vector< std::pair<Address,InetAddress> > surface(RR->sa->getReportedSurface());
for(std::vector< std::pair<Address,InetAddress> >::const_iterator s(surface.begin());s!=surface.end();++s) {
bool alreadyHave = false;
@@ -244,9 +242,10 @@ void Peer::pushDirectPaths(const RuntimeEnvironment *RR,RemotePath *path,uint64_
break;
}
}
- if ((!alreadyHave)&&(std::find(rootAddresses.begin(),rootAddresses.end(),s->first) == rootAddresses.end()))
+ if (!alreadyHave)
dps.push_back(Path(s->second,0,Path::TRUST_NORMAL));
}
+ */
#ifdef ZT_TRACE
{