Skip to content

Commit

Permalink
For events never forward packets with excessive hop_limit
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-bennett committed Jul 29, 2024
1 parent 44ea876 commit 53780c4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mesh/FloodingRouter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ void FloodingRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtas
meshtastic_MeshPacket *tosend = packetPool.allocCopy(*p); // keep a copy because we will be sending it

tosend->hop_limit--; // bump down the hop count
#if EVENT_MODE
if (tosend->hop_limit > 2) {
tosend->hop_limit = 2;
}
#endif

LOG_INFO("Rebroadcasting received floodmsg to neighbors\n");
// Note: we are careful to resend using the original senders node id
Expand Down

0 comments on commit 53780c4

Please sign in to comment.