From a3ef9b8a15554326aaffdf14ebcf7795e5b73aff Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 25 Jun 2019 10:06:50 -0700 Subject: Cleanup --- node/CertificateOfMembership.hpp | 4 +--- node/Constants.hpp | 12 +++++------- node/IncomingPacket.cpp | 3 --- 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 @@ -225,11 +225,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) * @@ -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(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]; -- cgit v1.2.3