diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-09-13 10:46:36 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-09-13 10:46:36 -0700 |
| commit | 8ef0e4bbafbd87c32c62553bd84d87bd0eda0e06 (patch) | |
| tree | 00cb512b83415878782f98dd211321bde4613c44 /node/Path.hpp | |
| parent | 0da9a9a3e01772bf9d534289c755ba96bd099ac9 (diff) | |
| download | infinitytier-8ef0e4bbafbd87c32c62553bd84d87bd0eda0e06.tar.gz infinitytier-8ef0e4bbafbd87c32c62553bd84d87bd0eda0e06.zip | |
Get rid of HELLO rate gate on path since its basically worthless. There are 65535 ports per IP.
Diffstat (limited to 'node/Path.hpp')
| -rw-r--r-- | node/Path.hpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/node/Path.hpp b/node/Path.hpp index 6278532d..27cff645 100644 --- a/node/Path.hpp +++ b/node/Path.hpp @@ -104,7 +104,6 @@ public: Path() : _lastOut(0), _lastIn(0), - _lastHello(0), _addr(), _localAddress(), _ipScope(InetAddress::IP_SCOPE_NONE) @@ -114,7 +113,6 @@ public: Path(const InetAddress &localAddress,const InetAddress &addr) : _lastOut(0), _lastIn(0), - _lastHello(0), _addr(addr), _localAddress(localAddress), _ipScope(addr.ipScope()) @@ -231,22 +229,9 @@ public: */ inline uint64_t lastIn() const { return _lastIn; } - /** - * @return True if we should allow HELLO via this path - */ - inline bool rateGateHello(const uint64_t now) - { - if ((now - _lastHello) >= ZT_PATH_HELLO_RATE_LIMIT) { - _lastHello = now; - return true; - } - return false; - } - private: uint64_t _lastOut; uint64_t _lastIn; - uint64_t _lastHello; InetAddress _addr; InetAddress _localAddress; InetAddress::IpScope _ipScope; // memoize this since it's a computed value checked often |
