diff --git a/FILTER.md b/FILTER.md index 48e291e9..4d14481e 100644 --- a/FILTER.md +++ b/FILTER.md @@ -1054,10 +1054,10 @@ filter get 0 filter stats ``` -| Typo in a command did nothing | Nothing is ignored any more: a command with an unexpected extra word, unbalanced quotes, or an over-long line is refused with a usage line and changes nothing | -| A channel is missing from `filter chan list` | The store holds more than fits one reply — the listing ends with `next=N`; run `filter chan list N` for the rest | | Symptom | Check | |---|---| +| Typo in a command did nothing | Nothing is ignored any more: a command with an unexpected extra word, unbalanced quotes, or an over-long line is refused with a usage line and changes nothing | +| A channel is missing from `filter chan list` | The store holds more than fits one reply — the listing ends with `next=N`; run `filter chan list N` for the rest | | Rule gets no hits | Is the filter on (`filter on`)? Is the rule enabled? Did an earlier rule match first? | | Sender/text never matches | Can the repeater decrypt the channel? Is it group text? Are you matching the right field (sender without colon, text without name)? | | Matches too broadly | Add `^`/`$` anchors; escape literal dots; remember `sender=Bot` matches `MyBot2` | diff --git a/examples/simple_repeater/AdvertRateLimiter.h b/examples/simple_repeater/AdvertRateLimiter.h index 042afb65..2381cead 100644 --- a/examples/simple_repeater/AdvertRateLimiter.h +++ b/examples/simple_repeater/AdvertRateLimiter.h @@ -21,9 +21,10 @@ struct AdvertSeenEntry { // RAM-only; cleared on reboot uint8_t pub_key_prefix[4]; // 4 pubkey bytes sampled at fixed offsets (see - // AdvertRateLimiter::drop); collision odds ~0.001% - // per 256 distinct nodes, vanity-robust; worst - // case is one falsely suppressed advert/window + // KEY_OFFSETS in AdvertRateLimiter.cpp); collision + // odds ~0.001% per 256 distinct nodes, + // vanity-robust; worst case is one falsely + // suppressed advert/window uint64_t first_seen_millis; // on this repeater's own 64-bit monotonic clock }; diff --git a/examples/simple_repeater/PacketFilter.cpp b/examples/simple_repeater/PacketFilter.cpp index 3486760a..4bbd0ea3 100644 --- a/examples/simple_repeater/PacketFilter.cpp +++ b/examples/simple_repeater/PacketFilter.cpp @@ -199,7 +199,7 @@ FilterChannel* FilterRules::addChannel(const char* name, const char* psk_hex) { if (psk_hex == NULL || psk_hex[0] == 0) { if (name[0] != '#') return NULL; // psk required for non-hash channels // hashtag channels are public-by-construction: secret = sha256(name)[0..15] - // (per the companion protocol; see plan §2.11) + // (per the companion protocol) uint8_t digest[32]; mesh::Utils::sha256(digest, sizeof(digest), (const uint8_t*)name, strlen(name)); memcpy(candidate.secret, digest, 16); @@ -365,7 +365,7 @@ static bool intervalMatches(const Interval& iv, int32_t v) { // Path chain predicate: sliding window of adjacent hash entries over pkt->path. // Each entry is a prefix compare of min(rule_len, path_hash_size) bytes. // Binary per-entry compare, NOT hex-string matching (odd-nibble alignment and -// variable entry sizes make string matching incorrect — plan §4.2a). +// variable entry sizes make string matching incorrect). static bool pathMatches(const FilterRule* r, const mesh::Packet* pkt) { // A recorded path is the flood relay history. A routed-direct packet's path is // an itinerary between two endpoints, and a TRACE path collects SNRs rather diff --git a/test/test_packet_filter/FilterTestHelpers.h b/test/test_packet_filter/FilterTestHelpers.h index cb027e28..94fec8ef 100644 --- a/test/test_packet_filter/FilterTestHelpers.h +++ b/test/test_packet_filter/FilterTestHelpers.h @@ -14,7 +14,7 @@ #include "CliUtil.h" // CLI_REPLY_MAX // payload offsets the advert rate limiter samples its 4-byte origin key from -// (mirrors the fixed KEY_OFFSETS in PacketFilter.cpp) +// (mirrors the fixed KEY_OFFSETS in AdvertRateLimiter.cpp) static const uint8_t ADV_KEY_OFFSETS[4] = { 8, 14, 20, 26 }; // Build a packet with the given header fields. mesh::Packet's constructor only