Deny maxhops to anyone who sets >7 (#2808)

* Deny maxhops to anyone who sets >7

* Use reliable hop count instead of 3
This commit is contained in:
code8buster 2023-09-18 17:58:09 +00:00 committed by GitHub
parent 6d211815d9
commit f737ee59ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);