summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2019-06-25 10:06:50 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2019-06-25 10:06:50 -0700
commita3ef9b8a15554326aaffdf14ebcf7795e5b73aff (patch)
tree262ab9894716387c322ae19385f6e12634f4654a
parent554e0b7c6de6eb0a3c1014b0bbfb5b967d427ed8 (diff)
downloadinfinitytier-a3ef9b8a15554326aaffdf14ebcf7795e5b73aff.tar.gz
infinitytier-a3ef9b8a15554326aaffdf14ebcf7795e5b73aff.zip
Cleanup
-rw-r--r--node/CertificateOfMembership.hpp4
-rw-r--r--node/Constants.hpp12
-rw-r--r--node/IncomingPacket.cpp3
3 files changed, 6 insertions, 13 deletions
diff --git a/node/CertificateOfMembership.hpp b/node/CertificateOfMembership.hpp
index 457b4c1f..b2c63f9d 100644
--- a/node/CertificateOfMembership.hpp
+++ b/node/CertificateOfMembership.hpp
@@ -113,9 +113,7 @@ public:
* Create an empty certificate of membership
*/
CertificateOfMembership() :
- _qualifierCount(0)
- {
- }
+ _qualifierCount(0) {}
/**
* Create from required fields common to all networks
diff --git a/node/Constants.hpp b/node/Constants.hpp
index 4f45f616..a51d378e 100644
--- a/node/Constants.hpp
+++ b/node/Constants.hpp
@@ -226,11 +226,6 @@
#define ZT_RECEIVE_QUEUE_TIMEOUT 5000
/**
- * Maximum latency to allow for OK(HELLO) before packet is discarded
- */
-#define ZT_HELLO_MAX_ALLOWABLE_LATENCY 120000
-
-/**
* Maximum number of ZT hops allowed (this is not IP hops/TTL)
*
* The protocol allows up to 7, but we limit it to something smaller.
@@ -265,7 +260,7 @@
#define ZT_PING_CHECK_INVERVAL 5000
/**
- * How often the local.conf file is checked for changes
+ * How often the local.conf file is checked for changes (service, should be moved there)
*/
#define ZT_LOCAL_CONF_FILE_CHECK_INTERVAL 10000
@@ -464,8 +459,11 @@
/**
* Delay between full-fledge pings of directly connected peers.
+ *
* With multipath bonding enabled ping peers more often to measure
- * packet loss and latency.
+ * packet loss and latency. This uses more bandwidth so is disabled
+ * by default to avoid increasing idle bandwidth use for regular
+ * links.
*/
#define ZT_MULTIPATH_PEER_PING_PERIOD 5000
diff --git a/node/IncomingPacket.cpp b/node/IncomingPacket.cpp
index 9caa3093..7a1193c0 100644
--- a/node/IncomingPacket.cpp
+++ b/node/IncomingPacket.cpp
@@ -473,9 +473,6 @@ bool IncomingPacket::_doOK(const RuntimeEnvironment *RR,void *tPtr,const SharedP
case Packet::VERB_HELLO: {
const uint64_t latency = RR->node->now() - at<uint64_t>(ZT_PROTO_VERB_HELLO__OK__IDX_TIMESTAMP);
- if (latency > ZT_HELLO_MAX_ALLOWABLE_LATENCY)
- return true;
-
const unsigned int vProto = (*this)[ZT_PROTO_VERB_HELLO__OK__IDX_PROTOCOL_VERSION];
const unsigned int vMajor = (*this)[ZT_PROTO_VERB_HELLO__OK__IDX_MAJOR_VERSION];
const unsigned int vMinor = (*this)[ZT_PROTO_VERB_HELLO__OK__IDX_MINOR_VERSION];