Repository navigation
fix(filter): five repeater filter bugs - #61
Merged
Merged
Conversation
- Malformed scan: a group text the Public key cannot open (a private channel whose hash byte collides with Public's 0x11) decrypted to len 0 and was dropped as MALFORMED_SHORT, so about 1 in 256 private channels was blocked. Content is now judged only when the decrypt succeeds, as the companion filter already does. - `filter malformed <other>` wrote no reply; over the mesh that left the reply buffer uninitialised. It now returns a syntax error. - The group-text rate limit ran before the channel block list and the content rules, so traffic those drop used up the budget legitimate channels share. GRP_TXT is now rate-limited last. - `filter hops`, `filter rate` and `filter hash` parsed into uint8_t / uint16_t, so out-of-range input wrapped (`filter hops 3 300` stored 44). Values are range-checked as long before narrowing. - `filter channel add [hash]` accepted names that do not fit the 32-byte slot. load() derives the key from the stored name, so after a reboot the cut-off name no longer blocked the channel. Such names are refused. Filter.h also redefined `struct ChannelDetails` from src/helpers/ChannelDetails.h. Renamed to FilterChannel; same layout, so existing /filter_prefs files load unchanged. Tests: new test_filter_behaviour drives Filter through its interface.
This was referenced Dec 1, 2026
Elektr0Vodka
added a commit
that referenced
this pull request
Dec 1, 2026
…nc-1201-pr61 chore: merge dmc-dev into dmc-dev-packetlog (2026-12-01, #61)
Elektr0Vodka
added a commit
that referenced
this pull request
Dec 1, 2026
…c-1201-pr61 chore: merge dmc-dev into dmc-observer-dev (2026-12-01, #61)
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.
Five repeater filter bugs found in the October architecture review. The fix was written then but never pushed. All five are still present on
dmc-dev: the original tests fail against current code.Fixes
0x11) decrypted to length 0 and was dropped as too short, about 1 in 256 private channels. Content is now judged only when the decrypt succeeds, as the companion filter already does.filter malformed <other>wrote no reply. Over the mesh the reply buffer was then uninitialised. It now returns a syntax error.filter hops,filter rateandfilter hashparsed into 8/16-bit types (filter hops 3 300stored 44). Values are range-checked before narrowing.filter channel addcut them off. Since fix(filter): match blocked channels by key, keep hash-only as an option #50,load()derives the key from the stored name, so after a reboot the cut-off name no longer blocked the channel. Such names are now refused, also foradd hash.struct ChannelDetailsinFilter.halso redefined the one insrc/helpers/ChannelDetails.h. It is renamed toFilterChannelwith the same layout, so existing/filter_prefsfiles load unchanged.Behaviour changes
Tests
test/test_filter_behaviour, including key and hash-only block entries, negative and out-of-range numbers, and the 31/32 character boundary.pio test -e native -e native_region_gating: all pass.native_kiss_modemdoes not start on my Windows PC, on unmodifieddmc-deveither (DLL entry-point error). CI covers it.pio runsucceeded forHeltec_v3_repeater,RAK_4631_repeater,PicoW_repeaterandwio-e5-mini_repeater(97.7% flash).Not tested on hardware or over the air. Needs propagating to
dmc-observer-devanddmc-dev-packetlog, which have the same filter code.