summaryrefslogtreecommitdiff
path: root/node/Peer.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2019-06-11 14:58:23 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2019-06-11 14:58:23 -0700
commit5b2b0887141da25c290608632c2e609764abbf73 (patch)
tree4a82abab15419e15d41cd0a20b8805516b09b984 /node/Peer.cpp
parent0bdfad52e7513e65ce2e654a9653e9d63fcd07a9 (diff)
downloadinfinitytier-5b2b0887141da25c290608632c2e609764abbf73.tar.gz
infinitytier-5b2b0887141da25c290608632c2e609764abbf73.zip
Cleanup, version bump.
Diffstat (limited to 'node/Peer.cpp')
-rw-r--r--node/Peer.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/node/Peer.cpp b/node/Peer.cpp
index 95a26003..da73e9cb 100644
--- a/node/Peer.cpp
+++ b/node/Peer.cpp
@@ -208,31 +208,12 @@ void Peer::received(
const uint64_t sinceLastPush = now - _lastDirectPathPushSent;
if (sinceLastPush >= ZT_DIRECT_PATH_PUSH_INTERVAL) {
_lastDirectPathPushSent = now;
-
- // Start with explicitly known direct endpoint paths.
std::vector<InetAddress> pathsToPush(RR->node->directPaths());
-
-#if 0
- // Do symmetric NAT prediction if we are communicating indirectly.
- if (hops > 0) {
- std::vector<InetAddress> sym(RR->sa->getSymmetricNatPredictions());
- for(unsigned long i=0,added=0;i<sym.size();++i) {
- InetAddress tmp(sym[(unsigned long)RR->node->prng() % sym.size()]);
- if (std::find(pathsToPush.begin(),pathsToPush.end(),tmp) == pathsToPush.end()) {
- pathsToPush.push_back(tmp);
- if (++added >= ZT_PUSH_DIRECT_PATHS_MAX_PER_SCOPE_AND_FAMILY)
- break;
- }
- }
- }
-#endif
-
if (pathsToPush.size() > 0) {
std::vector<InetAddress>::const_iterator p(pathsToPush.begin());
while (p != pathsToPush.end()) {
Packet outp(_id.address(),RR->identity.address(),Packet::VERB_PUSH_DIRECT_PATHS);
outp.addSize(2); // leave room for count
-
unsigned int count = 0;
while ((p != pathsToPush.end())&&((outp.size() + 24) < 1200)) {
uint8_t addressType = 4;
@@ -257,7 +238,6 @@ void Peer::received(
++count;
++p;
}
-
if (count) {
outp.setAt(ZT_PACKET_IDX_PAYLOAD,(uint16_t)count);
outp.compress();