summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
authorGrant Limberg <[email protected]>2023-05-03 10:23:06 -0700
committerGitHub <[email protected]>2023-05-03 10:23:06 -0700
commit54f339f0c0d2503a1fc0d18dd12bdc7a371cbf76 (patch)
treef119c12622430573f501652e0ccb39c03e05d3c5 /node
parent115b9147b9cb2542c0fac6abeb7267de9bb001f6 (diff)
fix a couple of metrics (#1989)
Diffstat (limited to 'node')
-rw-r--r--node/Bond.cpp1
-rw-r--r--node/IncomingPacket.cpp1
-rw-r--r--node/Peer.cpp3
3 files changed, 3 insertions, 2 deletions
diff --git a/node/Bond.cpp b/node/Bond.cpp
index 57551a74..21a8a563 100644
--- a/node/Bond.cpp
+++ b/node/Bond.cpp
@@ -879,6 +879,7 @@ void Bond::processBackgroundBondTasks(void* tPtr, int64_t now)
RR->node->putPacket(tPtr, _paths[i].p->localSocket(), _paths[i].p->address(), outp.data(), outp.size());
_paths[i].p->_lastOut = now;
_overheadBytes += outp.size();
+ Metrics::pkt_echo_out++;
// debug("tx: verb 0x%-2x of len %4d via %s (ECHO)", Packet::VERB_ECHO, outp.size(), pathToStr(_paths[i].p).c_str());
}
}
diff --git a/node/IncomingPacket.cpp b/node/IncomingPacket.cpp
index 77dcf6b6..f748bdb3 100644
--- a/node/IncomingPacket.cpp
+++ b/node/IncomingPacket.cpp
@@ -733,7 +733,6 @@ bool IncomingPacket::_doWHOIS(const RuntimeEnvironment *RR,void *tPtr,const Shar
if (count > 0) {
Metrics::pkt_ok_out++;
outp.armor(peer->key(),true,peer->aesKeysIfSupported());
- Metrics::pkt_ok_out++;
_path->send(RR,tPtr,outp.data(),outp.size(),RR->node->now());
}
diff --git a/node/Peer.cpp b/node/Peer.cpp
index 3aa2641c..c46bdf9d 100644
--- a/node/Peer.cpp
+++ b/node/Peer.cpp
@@ -445,9 +445,10 @@ void Peer::sendHELLO(void *tPtr,const int64_t localSocket,const InetAddress &atA
outp.cryptField(_key,startCryptedPortionAt,outp.size() - startCryptedPortionAt);
+ Metrics::pkt_hello_out++;
+
if (atAddress) {
outp.armor(_key,false,nullptr); // false == don't encrypt full payload, but add MAC
- Metrics::pkt_hello_out++;
RR->node->expectReplyTo(outp.packetId());
RR->node->putPacket(tPtr,RR->node->lowBandwidthModeEnabled() ? localSocket : -1,atAddress,outp.data(),outp.size());
} else {