diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-15 13:15:09 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-15 13:15:09 -0700 |
| commit | 98bcc3d4b575d4e11a82408b3ddb74489f81fb30 (patch) | |
| tree | f4aa7b1bbb389164dbbec58d3fa8344f85da8fe6 /node/Peer.cpp | |
| parent | 1c9ca73065975b137deb6770b4624886942c2605 (diff) | |
| download | infinitytier-98bcc3d4b575d4e11a82408b3ddb74489f81fb30.tar.gz infinitytier-98bcc3d4b575d4e11a82408b3ddb74489f81fb30.zip | |
Disable a few noisy TRACEs, and limit how often we confirm new paths to avoid flooding.
Diffstat (limited to 'node/Peer.cpp')
| -rw-r--r-- | node/Peer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/node/Peer.cpp b/node/Peer.cpp index 4d942957..526e3a28 100644 --- a/node/Peer.cpp +++ b/node/Peer.cpp @@ -45,6 +45,7 @@ Peer::Peer(const Identity &myIdentity,const Identity &peerIdentity) _lastUnicastFrame(0), _lastMulticastFrame(0), _lastAnnouncedTo(0), + _lastPathConfirmationSent(0), _vMajor(0), _vMinor(0), _vRevision(0), @@ -111,8 +112,11 @@ void Peer::received( * paths without confirming that a bidirectional link is in * fact present, but any packet that decodes and authenticates * correctly is considered valid. */ - TRACE("got non-confirmation %s from unknown path %s(%s), pinging...",Packet::verbString(verb),_id.address().toString().c_str(),remoteAddr.toString().c_str()); - attemptToContactAt(RR,remoteAddr,linkDesperation,now); + if ((now - _lastPathConfirmationSent) >= ZT_MIN_PATH_CONFIRMATION_INTERVAL) { + _lastPathConfirmationSent = now; + TRACE("got %s via unknown path %s(%s), confirming...",Packet::verbString(verb),_id.address().toString().c_str(),remoteAddr.toString().c_str()); + attemptToContactAt(RR,remoteAddr,linkDesperation,now); + } } } } |
