From a155587b7fff77f01799af821794dd1810e50007 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Sun, 18 May 2025 21:22:27 +1000 Subject: [PATCH] * possible bug when forwarding direct mode packets --- src/Mesh.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Mesh.cpp b/src/Mesh.cpp index fe3b2473..6029c192 100644 --- a/src/Mesh.cpp +++ b/src/Mesh.cpp @@ -71,7 +71,15 @@ DispatcherAction Mesh::onRecvPacket(Packet* pkt) { // remove our hash from 'path', then re-broadcast pkt->path_len -= PATH_HASH_SIZE; + #if 0 memcpy(pkt->path, &pkt->path[PATH_HASH_SIZE], pkt->path_len); + #elif PATH_HASH_SIZE == 1 + for (int k = 0; k < pkt->path_len; k++) { // shuffle bytes by 1 + pkt->path[k] = pkt->path[k + 1]; + } + #else + #error "need path remove impl" + #endif uint32_t d = getDirectRetransmitDelay(pkt); return ACTION_RETRANSMIT_DELAYED(0, d); // Routed traffic is HIGHEST priority