feat: add path.hash.mode.min CLI command for repeaters#2707
Open
StijnBTC wants to merge 2 commits into
Open
Conversation
ViezeVingertjes
approved these changes
Jun 6, 2026
|
👍 |
Add a new CLI setting to enforce minimum path hash size on flood packet forwarding. Repeaters can now drop flood packets with insufficient hash size using: set path.hash.mode.min <0-2> - 0: no minimum (default, forward all) - 1: require hash_size >= 2 (drop 1-byte hashes) - 2: require hash_size >= 3 (drop 1-2 byte hashes) Implemented in simple_repeater example and persisted to preferences. Tested and verified on RAK 4631 repeater.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a new CLI command
path.hash.mode.minto allow repeaters to enforce a minimum path hash size for forwarded flood packets.Changes
min_path_hash_modefield toNodePrefsstruct for persistencegetandset path.hash.mode.mincommandssimple_repeaterallowPacketForward()methodBehavior
The repeater will drop flood packets with insufficient hash size:
0: No minimum enforced (default, forward all packets)1: Require hash_size >= 2 bytes (drop mode 0 packets)2: Require hash_size >= 3 bytes (drop mode 0-1 packets)Testing