From bdef9d3bd76e205c37fa4eeb3c8497235a72b4d7 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Tue, 14 Dec 2021 21:20:58 -0800 Subject: [PATCH] Fix situation where too many ECHOs are sent to multipath peer --- node/Bond.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/node/Bond.cpp b/node/Bond.cpp index dde6e22b6..c88f22170 100644 --- a/node/Bond.cpp +++ b/node/Bond.cpp @@ -762,6 +762,7 @@ void Bond::processBackgroundBondTasks(void* tPtr, int64_t now) outp.armor(_peer->key(), true, _peer->aesKeysIfSupported()); RR->node->expectReplyTo(outp.packetId()); RR->node->putPacket(tPtr, _paths[i].p->localSocket(), _paths[i].p->address(), outp.data(), outp.size()); + _paths[i].p->_lastOut = now; _overheadBytes += outp.size(); log("sent ECHO via link %s", pathToStr(_paths[i].p).c_str()); } @@ -1708,7 +1709,14 @@ void Bond::dumpInfo(int64_t now, bool force) _lastSummaryDump = now; float overhead = (_overheadBytes / (timeSinceLastDump / 1000.0f) / 1000.0f); _overheadBytes = 0; - log("bond: bp=%d, fi=%d, mi=%d, ud=%d, dd=%d, flows=%lu, overhead=%f KB/s", _policy, _failoverInterval, _monitorInterval, _upDelay, _downDelay, (unsigned long)_flows.size(), overhead); + log("bond: bp=%d, fi=%d, mi=%d, ud=%d, dd=%d, flows=%lu, overhead=%f KB/s", + _policy, + _failoverInterval, + _monitorInterval, + _upDelay, + _downDelay, + (unsigned long)_flows.size(), + overhead); for (int i = 0; i < ZT_MAX_PEER_NETWORK_PATHS; ++i) { if (_paths[i].p) { dumpPathStatus(now, i);