From 63c8f15d387b724bdcfb33d277d401e81ba6a73e Mon Sep 17 00:00:00 2001 From: GUVWAF <78759985+GUVWAF@users.noreply.github.com> Date: Sat, 13 Aug 2022 17:09:43 +0200 Subject: [PATCH] Resend implicit ACK for a repeated broadcast (#1628) --- src/mesh/ReliableRouter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mesh/ReliableRouter.cpp b/src/mesh/ReliableRouter.cpp index 9a65823e..51078283 100644 --- a/src/mesh/ReliableRouter.cpp +++ b/src/mesh/ReliableRouter.cpp @@ -67,6 +67,12 @@ bool ReliableRouter::shouldFilterReceived(MeshPacket *p) sendAckNak(Routing_Error_NONE, getFrom(p), p->id, p->channel); DEBUG_MSG("acking a repeated want_ack packet\n"); } + } else if (wasSeenRecently(p, false) && p->hop_limit == HOP_RELIABLE) { + // retransmission on broadcast has hop_limit still equal to HOP_RELIABLE + DEBUG_MSG("Resending implicit ack for a repeated floodmsg\n"); + MeshPacket *tosend = packetPool.allocCopy(*p); + tosend->hop_limit--; // bump down the hop count + Router::send(tosend); } return FloodingRouter::shouldFilterReceived(p);