From f737ee59ec2f706d492fc251fc4e0cc92106d971 Mon Sep 17 00:00:00 2001 From: code8buster <20384924+code8buster@users.noreply.github.com> Date: Mon, 18 Sep 2023 17:58:09 +0000 Subject: [PATCH] Deny maxhops to anyone who sets >7 (#2808) * Deny maxhops to anyone who sets >7 * Use reliable hop count instead of 3 --- src/mesh/RadioInterface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesh/RadioInterface.cpp b/src/mesh/RadioInterface.cpp index 61b6b85d0..0d2238396 100644 --- a/src/mesh/RadioInterface.cpp +++ b/src/mesh/RadioInterface.cpp @@ -534,8 +534,8 @@ size_t RadioInterface::beginSending(meshtastic_MeshPacket *p) h->id = p->id; h->channel = p->channel; if (p->hop_limit > HOP_MAX) { - LOG_WARN("hop limit %d is too high, setting to %d\n", p->hop_limit, HOP_MAX); - p->hop_limit = HOP_MAX; + LOG_WARN("hop limit %d is too high, setting to %d\n", p->hop_limit, HOP_RELIABLE); + p->hop_limit = HOP_RELIABLE; } h->flags = p->hop_limit | (p->want_ack ? PACKET_FLAGS_WANT_ACK_MASK : 0);