meshtastic / Meshtastic-Android

Android application for Meshtastic
https://meshtastic.org
GNU General Public License v3.0
628 stars 189 forks source link

HopLimit could be set >7 #1070

Closed karamo closed 3 weeks ago

karamo commented 4 weeks ago

In the APP HopLimit could be set >7

APP 2.3.11

garthvh commented 4 weeks ago

The firmware will set it to 3

karamo commented 4 weeks ago

yes, but it would be shown wrong in the APP

   if (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;
    }
prokrypt commented 4 weeks ago

It would be fine to default to 3 hops because whoever sets more than 7 hops obviously doesn't know what they're doing. Better to ensure mesh integrity than to let a user to make bad decisions.

Ztrby commented 3 weeks ago

Maybe there should be warnings if someone try to set it over 5 . It maybe be ok in a small mesh. But it may break a big mesh.