diff --git a/node/Bond.cpp b/node/Bond.cpp index 14d1e1023..3e3cd5b2a 100644 --- a/node/Bond.cpp +++ b/node/Bond.cpp @@ -717,6 +717,7 @@ void Bond::sendPATH_NEGOTIATION_REQUEST(void* tPtr, int pathIdx) if (_paths[pathIdx].p->address()) { outp.armor(_peer->key(), false, _peer->aesKeysIfSupported()); RR->node->putPacket(tPtr, _paths[pathIdx].p->localSocket(), _paths[pathIdx].p->address(), outp.data(), outp.size()); + _overheadBytes += outp.size(); } } @@ -726,7 +727,6 @@ void Bond::sendQOS_MEASUREMENT(void* tPtr, int pathIdx, int64_t localSocket, con Packet outp(_peer->_id.address(), RR->identity.address(), Packet::VERB_QOS_MEASUREMENT); char qosData[ZT_QOS_MAX_PACKET_SIZE]; int16_t len = generateQoSPacket(pathIdx, _now, qosData); - _overheadBytes += len; if (len) { outp.append(qosData, len); if (atAddress) { @@ -738,6 +738,7 @@ void Bond::sendQOS_MEASUREMENT(void* tPtr, int pathIdx, int64_t localSocket, con } _paths[pathIdx].packetsReceivedSinceLastQoS = 0; _paths[pathIdx].lastQoSMeasurement = now; + _overheadBytes += outp.size(); } // debug("send QOS via link %s (len=%d)", pathToStr(_paths[pathIdx].p).c_str(), len); }