Extend flood policy and harden message retries

This commit is contained in:
mikecarper committed 2026-08-07 14:26:31 -07:00
1 parent 687e114828
commit 7f56da7a34
34 files changed
+5297 -1338

No files matched your search

+2 -4
View File
@@ -117,10 +117,9 @@ fix, no WiFi connection, an inactive bridge, or an nRF52 bootloader without
| Routing | [`get/set flood.max.unscoped`](cli_commands.md#limit-the-number-of-hops-for-an-unscoped-flood-message) | Repeater | Yes | Yes | Yes |
| Routing | [`get/set flood.max.advert`](cli_commands.md#limit-the-number-of-hops-for-an-advert-flood-message) | Repeater | Yes | Yes | Yes |
| Routing | [`get/set flood.channel.data`; `get/set flood.channel.data.hops`](cli_commands.md#forward-flood-group-data-packets-on-repeaters) | Repeater | Yes | Yes | Yes |
| Routing | [`get/set/del flood.channel.block*`](cli_commands.md#block-selected-flood-channel-packets-on-repeaters) | Repeater | Yes | Yes | Yes |
| Routing | [`get/set/del flood.channel.scope*`](cli_commands.md#force-a-transport-scope-onto-floods) | Repeater | Yes | Yes | Yes |
| Routing | [`get/set/del flood.channel.scope.require*`](cli_commands.md#require-valid-incoming-scopes-only-on-selected-channels) | Repeater | Yes | Yes | Yes |
| Routing | [`get/set/del flood.filter*`; `get/set/del flood.filter.blacklist*`](cli_commands.md#filter-flood-packets-by-payload-type-hop-count-and-path) | Repeater | Yes | Yes | Yes |
| Routing | [`get/set/del flood.rule*`; `get/set/del flood.filter*`; `get/set/del flood.filter.blacklist*`](cli_commands.md#change-persistent-flood-rules-in-the-field) | Repeater; `flood.rule`/`flood.filter` also on FULL ESP32 room server (no blacklist) | Yes | Yes | Yes |
| Routing | [`get/set/del flood.moderation*`](cli_commands.md#moderate-flood-group-text-by-channel-sender-and-source-path) | Repeater | Yes | Yes | Yes |
| Routing | [`get/set outpath`](halo_keymind_settings.md#direct-path-overrides) | Repeater remote-client context | Yes | Yes | Yes |
| Routing | [`get/set altpath`](halo_keymind_settings.md#direct-path-overrides) | Repeater remote-client context | Yes | Yes | Yes |
@@ -273,10 +272,9 @@ fix, no WiFi connection, an inactive bridge, or an nRF52 bootloader without
| Routing | [`get/set flood.max.unscoped`](cli_commands.md#limit-the-number-of-hops-for-an-unscoped-flood-message) | Repeater, full common parser | Yes | Yes | Yes | No | No | Yes | Yes |
| Routing | [`get/set flood.max.advert`](cli_commands.md#limit-the-number-of-hops-for-an-advert-flood-message) | Repeater, full common parser | Yes | Yes | Yes | No | No | Yes | Yes |
| Routing | [`get/set flood.channel.data`; `get/set flood.channel.data.hops`](cli_commands.md#forward-flood-group-data-packets-on-repeaters) | Repeater, full common parser | Yes | Yes | Yes | No | No | Yes | Yes |
| Routing | [`get/set/del flood.channel.block*`](cli_commands.md#block-selected-flood-channel-packets-on-repeaters) | Repeater, full common parser | Yes | Yes | Yes | No | No | Yes | Yes |
| Routing | [`get/set/del flood.channel.scope*`](cli_commands.md#force-a-transport-scope-onto-floods) | Repeater role handler | Yes | Yes | Yes | No | Yes | Yes | Yes |
| Routing | [`get/set/del flood.channel.scope.require*`](cli_commands.md#require-valid-incoming-scopes-only-on-selected-channels) | Repeater role handler | Yes | Yes | Yes | No | Yes | Yes | Yes |
| Routing | [`get/set/del flood.filter*`; `get/set/del flood.filter.blacklist*`](cli_commands.md#filter-flood-packets-by-payload-type-hop-count-and-path) | Repeater role handler | Yes | Yes | Yes | No | Yes | Yes | Yes |
| Routing | [`get/set/del flood.rule*`; `get/set/del flood.filter*`; `get/set/del flood.filter.blacklist*`](cli_commands.md#change-persistent-flood-rules-in-the-field) | Repeater role handler; `flood.rule`/`flood.filter` also on FULL ESP32 room server (no blacklist) | Yes | Yes | Yes | No | Yes | Yes | Yes |
| Routing | [`get/set/del flood.moderation*`](cli_commands.md#moderate-flood-group-text-by-channel-sender-and-source-path) | Repeater role handler | Yes | Yes | Yes | No | Yes | Yes | Yes |
| Routing | [`get/set outpath`](halo_keymind_settings.md#direct-path-overrides) | Repeater remote-client context | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Routing | [`get/set altpath`](halo_keymind_settings.md#direct-path-overrides) | Repeater remote-client context | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
+217 -185
View File
@@ -25,7 +25,7 @@ arguments such as node names, passwords, and keys is left unchanged.
- [System](#system)
- [GPIO](#control-an-exposed-gpio)
- [Routing](#routing)
- [Flood Filtering](#filter-flood-packets-by-payload-type-and-hop)
- [Flood Rules](#change-persistent-flood-rules-in-the-field)
- [Group Text Moderation](#moderate-flood-group-text-by-channel-sender-and-source-path)
- [ACL](#acl)
- [Region Management](#region-management-v110)
@@ -1016,10 +1016,10 @@ get clock.sync.status
**Usage:**
- `get gpio` — list the Arduino pin numbers this firmware build permits
- `get gpio state`, `get gpio states`, or `get gpio status` — list every available pin currently controlled by the user (anything not in `reset`)
- `get gpio state <pin>` — show one pin's state; `states` and `status` are accepted here too
- `get gpio <pin>` — show `on`, `off`, or `reset`, plus any pending timed transition
- `get gpio` - list the Arduino pin numbers this firmware build permits
- `get gpio state`, `get gpio states`, or `get gpio status` - list every available pin currently controlled by the user (anything not in `reset`)
- `get gpio state <pin>` - show one pin's state; `states` and `status` are accepted here too
- `get gpio <pin>` - show `on`, `off`, or `reset`, plus any pending timed transition
- `set gpio <pin> on`
- `set gpio <pin> off`
- `set gpio <pin> reset`
@@ -1027,9 +1027,9 @@ get clock.sync.status
**Examples:**
- `set gpio 16 on 30 off` — drive GPIO16 high for 30 seconds, then drive it low
- `set gpio 16 on 5ms off` — drive GPIO16 high for 5 milliseconds, then drive it low
- `set gpio 16 off 5 reset` — drive GPIO16 low for 5 seconds, then return it to high impedance
- `set gpio 16 on 30 off` - drive GPIO16 high for 30 seconds, then drive it low
- `set gpio 16 on 5ms off` - drive GPIO16 high for 5 milliseconds, then drive it low
- `set gpio 16 off 5 reset` - drive GPIO16 low for 5 seconds, then return it to high impedance
An integer duration has seconds as its default unit, so `5` means 5 seconds. Add `ms` for milliseconds (`5ms`); an explicit `s` suffix is also accepted (`5s`). The maximum duration is 24 hours (86,400 seconds or 86,400,000 milliseconds). `on` or `off` without a duration remains in that state until another command, reset, or reboot.
@@ -1334,108 +1334,36 @@ reduce false recoveries when no traffic is expected.
**Forwarding behavior:** Repeater firmware only. The repeater still receives and
logs the packet when logging is enabled; this only blocks retransmission.
This is checked before `flood.channel.block` and applies to flood `GRP_DATA`
packets regardless of channel key. Flood group text (`GRP_TXT`) is unaffected by
this setting.
`flood.channel.data.hops` is separate from `flood.channel.block.hops`.
`flood.channel.block.hops` does not restrict unkeyed `GRP_DATA` packets. With
the default `flood.channel.data on`, `GRP_DATA` repeats normally even when
`flood.channel.block.hops` is set for keyed channel blocks.
This is checked before FPF7 and applies to flood `GRP_DATA` packets regardless
of channel key. Flood group text (`GRP_TXT`) is unaffected by this setting.
`get flood.channel.data` includes the active hop gate as `h=all` or `h>N`.
---
#### Block selected flood channel packets on repeaters
**Usage:**
- `get flood.channel.block`
- `get flood.channel.block.<n>`
- `get flood.channel.block <name|8_hex_prefix>`
- `get flood.channel.block.hops`
- `set flood.channel.block <key> <name> [h=<all|1-7|default>]`
- `set flood.channel.block.<n> <key> <name> [h=<all|1-7|default>]`
- `set flood.channel.block #channel [h=<all|1-7|default>]`
- `set flood.channel.block.<n> #channel [h=<all|1-7|default>]`
- `set flood.channel.block.hops <all|1-7>`
- `del flood.channel.block.<n>`
- `del flood.channel.block <name|8_hex_prefix>`
#### Block selected flood channels with FPF7
**Parameters:**
- `n`: Slot number from `1` to `15`.
- `key`: 128-bit or 256-bit channel key as hex.
- `#channel`: Public hashtag channel name; derives the 128-bit channel key from the hashtag and is stored as the row name.
- `name`: Local label for hex-key rows. Not needed for `#channel`; extra text after `#channel` is ignored unless it is a hop setting.
- `8_hex_prefix`: First 4 bytes of the derived channel hash, shown by single-entry `get`.
- `all`: Block matching flood channel packets at any received flood hop count.
- `1-7`: Maximum received flood path hash count to repeat. Matching packets over this hop count are blocked.
- `default`: Row inherits the global `flood.channel.block.hops` setting.
**Slot behavior:** Without `.n`, `set flood.channel.block` updates an existing
row with the same derived channel prefix or name, otherwise it uses the next
empty slot. If all 15 slots are full, the command fails. With `.n`, the command
writes that slot.
**Default row:** Repeater firmware seeds a new block list with
`#wardriving h=4` in slot 1. This is a normal row, so it can be changed with
`set flood.channel.block #wardriving h=<all|1-7|default>` or removed with
`del flood.channel.block #wardriving`. Once the block list has been saved, the
firmware uses the saved list and does not recreate the default after deletion.
Restore the exact seeded row with:
The separate `flood.channel.block` command and 15-row table have been retired.
Generalized repeaters use the 31-row FPF7 table for authenticated channel
blocks:
```text
set flood.channel.block.1 #wardriving h=4
set flood.rule type=any channel=#test hops=all drop
set flood.rule.2 type=any channel=#wardriving hops=5+ drop
set flood.rule type=any channel=9cd8fcf22a47333b591d96a2b848b73f hops=4+ drop
get flood.rule
del flood.rule.2
```
This explicitly writes slot 1. Omit `.1` to update an existing wardriving row
or use the first empty slot instead.
`type=any` with a channel condition can authenticate only `GRP_TXT` and
`GRP_DATA`, so it does not match other payload types. Use `hops=all` to block
at every received hop count. To preserve the old `h=N` meaning of repeating
through `N` hops and blocking longer paths, use `hops=N+1+`; old `h=4` is
therefore `hops=5+`.
**Forwarding behavior:** Repeater firmware only. This only affects received
flood `GRP_TXT` and `GRP_DATA` channel packets. The repeater still receives and
logs the packet, but it does not retransmit it when a configured block entry can
validate/decode it. If `flood.channel.data` is `off`, `GRP_DATA` packets are
checked against the separate `flood.channel.data.hops` gate before this
per-channel check runs.
**Hop gate:** `flood.channel.block.hops` defaults to `all`, which preserves the
original behavior. When set to `N` from `1` to `7`, block rows that inherit the
global setting only block packets whose received flood path hash count is
greater than `N`; packets at `N` hops or lower can still repeat. For example,
`set flood.channel.block.hops 1` repeats zero-hop and one-hop matches but blocks
two-hop and longer matches.
Each block row can override the global hop gate with `h=<all|1-7|default>`.
For example, the seeded `#wardriving h=4` row blocks `#wardriving` matches
above four hops, while `set flood.channel.block #bot h=7` blocks
`#bot` matches above seven hops. Use `h=default` to make the row inherit the
global setting again.
`get flood.channel.block` includes the global default first, then adds per-row
overrides as `/h>N` or `/h=all`; inherited rows do not show a suffix. Single-row
`get` replies include that row's stored hop mode as `h=def`, `h=all`, or `h>N`.
List replies truncate displayed row names only when the full list would exceed
the remote-management response limit.
**Matching behavior:** Each block entry stores the first 4 bytes of the derived
channel hash for display and lookup. Current group packets carry only the first
channel-hash byte, so that byte is used as a cheap prefilter. Only entries whose
first hash byte matches the packet try MAC/decrypt with their stored key. If
multiple blocked channels share the same first byte, the repeater tries each
matching key until one validates; the packet is blocked only after a successful
MAC/decrypt.
**Examples:**
```
set flood.channel.block #test
set flood.channel.block.2 9cd8fcf22a47333b591d96a2b848b73f #test
set flood.channel.block.hops 3
set flood.channel.block #wardriving h=4
set flood.channel.block #bot h=7
get flood.channel.block
get flood.channel.block.hops
get flood.channel.block #test
del flood.channel.block.2
```
New generalized repeater tables seed slot 2 with the second example. Existing
FCB2 rows are imported once into free FPF7 slots and the retired file is then
removed. The fixed-size STM32WL FPF6 build cannot match authenticated channels.
---
@@ -1443,8 +1371,8 @@ del flood.channel.block.2
**Usage:**
- `get flood.channel.scope`
- `get flood.channel.scope.<n>`
- `set flood.channel.scope <channel|txt:*|login:*|other:*> <region> [path=blacklist|path=bucket:1-6] [tx=slow]`
- `set flood.channel.scope.<n> <channel|txt:*|login:*|other:*> <region> [path=blacklist|path=bucket:1-6] [tx=slow]`
- `set flood.channel.scope <channel|txt:*|login:*|other:*> <region|scope=name> [path=blacklist|path=bucket:1-6] [tx=slow]`
- `set flood.channel.scope.<n> <channel|txt:*|login:*|other:*> <region|scope=name> [path=blacklist|path=bucket:1-6] [tx=slow]`
- `del flood.channel.scope.<n>`
- `del flood.channel.scope all`
@@ -1460,11 +1388,16 @@ del flood.channel.block.2
`RESPONSE`, `TXT_MSG`, `ANON_REQ`, and `PATH` (`0x00`, `0x01`, `0x02`,
`0x07`, and `0x08`). It classifies the outer type; a transit repeater cannot
authenticate whether a packet is actually part of a login session.
- `other:*`: Type-based wildcard for every remaining flood payload type except
TRACE, including ACK, advert, multipart, control, OTA, reserved types, and
raw custom. TRACE is deliberately exempt from forced-scope wildcards.
- `other:*`: Type-based wildcard for every remaining flood payload type,
including flood-form TRACE, ACK, advert, multipart, control, OTA, reserved
types, and raw custom.
- `region`: Existing named region with a usable transport key. A unique region
name prefix is accepted; wildcard region `*` is not a scope target.
- `scope=<name>`: Regionless alternative to `region`. The public name is
normalized with a leading `#`, and its 128-bit transport key is derived
directly from that hashtag exactly as for `flood.filter scope=<name>`. It
does not need to exist in the region list. Public names up to 30 characters
are accepted; private `$` scopes are not.
- `path=blacklist`: Optional. Require the received path to match the passive
`flood.filter.blacklist` ID table. No `flood.filter` drop row needs to be
enabled. One exact listed ID qualifies a 3-byte path. A 2-byte path requires
@@ -1494,15 +1427,16 @@ rows for the same channel. With `.n`, it replaces that slot. The three
wildcard classes are independent and consume one slot each.
`get flood.channel.scope` reports active/total slot counts; use the numbered
form for row detail. Keyed rows are displayed by the first four bytes of their
derived channel hash because channel secrets are never returned.
derived channel hash because channel secrets are never returned. Regionless
targets are displayed with their normalized leading `#`.
This acts on received `ROUTE_TYPE_FLOOD` and
`ROUTE_TYPE_TRANSPORT_FLOOD` packets. An unscoped packet gains the configured
scope; an already-scoped packet has its existing transport codes replaced. For
`GRP_TXT` and `GRP_DATA`, all exact channel-key rows are tried first and must
validate the packet MAC/decryption. Matching path-qualified exact rows are
tried before ordinary exact fallback rows. A row whose target region is
missing or unusable is skipped; later exact rows and then `txt:*` are tried.
tried before ordinary exact fallback rows. A region-backed row whose target
is missing or unusable is skipped; later exact rows and then `txt:*` are tried.
Exact keyed rows with a usable target therefore beat `txt:*` regardless of
slot number. Within each wildcard class, path-qualified rows similarly precede
ordinary fallback rows. `login:*` and `other:*` select their non-overlapping
@@ -1510,19 +1444,18 @@ outer-type families without decrypting the payload. The lowest usable slot
wins within each priority tier.
Standard traceroute is direct-routed and is therefore outside this flood-only
table. A custom flood-form `TRACE` is also left unchanged: no wildcard adds a
scope, an existing transport code is preserved, and region/unknown-code gates
do not block it.
table. A custom flood-form `TRACE` is treated like every other flood: an
applicable wildcard may rewrite it and region/unknown-code gates still apply.
On a match, the repeater sets the route to `ROUTE_TYPE_TRANSPORT_FLOOD`,
computes transport code 0 from the selected region key and packet payload, and
sets transport code 1 to zero. This occurs before region enforcement,
forwarding filters, and the seen-packet lookup. For an already-scoped packet,
the selected code replaces both incoming transport-code fields. Direct routes
are never rewritten. A packet converted from unscoped is no longer subject to
`flood.max.unscoped`; all rewritten packets remain subject to normal payload
handling, `flood.max`, region allow/deny, `flood.filter`,
`flood.channel.block`, loop detection, and moderation. Assigning a scope does
computes transport code 0 from the selected region or direct hashtag key and
packet payload, and sets transport code 1 to zero. This occurs before region
enforcement, forwarding filters, and the seen-packet lookup. For an
already-scoped packet, the selected code replaces both incoming transport-code
fields. Direct routes are never rewritten. A packet converted from unscoped is
no longer subject to `flood.max.unscoped`; all rewritten packets remain subject
to normal payload handling, `flood.max`, `flood.filter`,
loop detection, and moderation. Assigning a scope does
not make a packet type forwardable if the core would otherwise reject it. By
default, if the selected scope differs and the rewritten packet is accepted
for forwarding, its initial retransmission uses zero `txdelay` and the highest
@@ -1536,29 +1469,39 @@ Neither mode preempts an active radio transmission or bypasses CAD and
airtime-budget limits. Selecting the scope already carried by the packet is a
no-op and does not grant special transmit treatment.
If a row's target region has been removed or has no usable key, the repeater
A region-backed target must be locally flood-allowed and remains subject to
the normal region gate. A `scope=<name>` target is trusted for this matched
receive pass even though it has no region-list entry, matching the behavior of
`flood.filter scope=<name>`. It does not create a region, consume a region
slot, or change the allow/deny state for unrelated packets carrying the same
transport code.
If a region-backed row's target has been removed or has no usable key, the repeater
tries the next applicable row. For group packets this means later authenticated
exact rows followed by `txt:*`; wildcard duplicates likewise fall through to
the next usable slot. When no usable mapping exists, the packet retains its
original unscoped or scoped route.
LoRa OTA remains functional when `other:*` is configured. OTA packets are
given that region's transport code, replacing an existing code when necessary,
given that target's transport code, replacing an existing code when necessary,
but the OTA handler still accepts and re-floods them during the temporary-radio
window. The target region must allow flooding. The OTA core itself is dormant
outside that window; no default flood filter row is needed for that behavior.
Forced scope does not make OTA operate outside the window.
window. A region target must allow flooding; a direct target follows the
regionless trust behavior above. The OTA core itself is dormant outside that
window; no default flood filter row is needed for that behavior. Forced scope
does not make OTA operate outside the window.
**Capacity cost:** Each slot uses 36 bytes of runtime RAM and persistent
storage, plus a 5-byte file header. The four-slot minimum uses 144 bytes RAM and
a 149-byte file; it has room for the three wildcard classes plus one exact
channel mapping. Very-tight 15-slot builds use 540 bytes RAM and a 545-byte
file. The 31-slot table uses 1,116 bytes RAM and a 1,121-byte file. Roomy ESP32
builds use a 255-slot table: 9,180 bytes RAM and a 9,185-byte file. Classic
ESP32 LoRa-OTA builds that cannot afford that RAM use 31 slots instead. The
existing region table still permits 32 named regions, so a 255-slot channel
table may reuse targets but cannot name more than 32 distinct configured region
scopes.
**Capacity cost:** Each rule slot retains its 36-byte runtime and persistent
record. A separate 32-byte-name table holds up to the smaller of the rule count
or 32 distinct regionless targets; very-tight STM32WL builds hold one reusable
direct target. Region-backed targets do not consume this table.
The four-slot minimum uses 272 bytes RAM and a 278-byte file; it has room for
the three wildcard classes plus one exact channel mapping. Very-tight 15-slot
builds use 572 bytes RAM and a 578-byte file. The 31-slot table uses 2,108
bytes RAM and a 2,114-byte file. Roomy ESP32 builds use 255 rule slots and 32
direct-target slots: 10,204 bytes RAM and a 10,210-byte file. Classic ESP32
LoRa-OTA builds that cannot afford the 255-rule table use 31 slots instead.
Both configured regions and regionless targets can be reused by any number of
rules.
**Duplicate behavior:** Mesh dedup hashes payload type and payload bytes; it
does not hash route type, transport codes, or the ordinary flood path. Adding
@@ -1579,9 +1522,9 @@ already-scoped winner may have its code replaced by the better queued scope.
The comparison is deferred until dequeue so each copy retains its original
scope and path for arbitration. It can only use copies still present in
`rxdelay`; it cannot replace a packet that already won the dedupe race. TRACE
is excluded from scope arbitration entirely, so rxdelay never adds or replaces
a trace transport code.
`rxdelay`; it cannot replace a packet that already won the dedupe race.
Flood-form TRACE participates in this arbitration; direct traceroute does not
enter the flood queue.
A packet that matches a fast `flood.channel.scope` or `flood.filter scope=`
action and needs its scope changed bypasses the inbound `rxdelay` queue. A
@@ -1601,6 +1544,19 @@ get flood.channel.scope.1
del flood.channel.scope.2
```
A regionless exact mapping needs no `region` command:
```text
set flood.channel.scope #rgdata scope=BlackHole86
get flood.channel.scope
get flood.channel.scope.1
```
For example, if an authenticated `#rgdata` packet arrives carrying scope
`#usa`, that rule replaces `#usa` with `#BlackHole86` before forwarding. The
rule also assigns `#BlackHole86` when the packet is unscoped or carries any
other scope; it is a channel-to-target mapping, not an incoming-scope filter.
To use bridge bucket 1 to assign `east` to `public` packets whose received
3-byte path contains `7576FB`, while assigning `west` to every other
authenticated `public` packet:
@@ -1641,7 +1597,7 @@ they cannot rescue it or grant special receive/transmit timing.
Other group channels bypass the region/unknown-code gate while the table is
active. They remain subject to every other forwarding control, including
`repeat`, `flood.max*`, packet filters, channel blocks, loop detection, payload
`repeat`, `flood.max*`, packet filters, loop detection, payload
validation, and moderation. Non-channel flood payload types retain normal
global region enforcement.
@@ -1665,12 +1621,17 @@ get flood.channel.scope.require.1
---
#### Filter flood packets by payload type, hop count, and path
#### Change persistent flood rules in the field
For setup guidance, interactions with the existing forwarding controls, and
worked moderation examples, see [Repeater Flood Filtering and Moderation](flood_filtering.md).
worked moderation examples, see [Flood Filtering and Moderation](flood_filtering.md).
**Usage:**
- `get flood.rule`
- `get flood.rule.<n>`
- `set flood.rule[.<n>] type=<type> [hops=<range>] [channel=<channel>] [prefix=<path-prefix>] [in=<input-scope>] <drop|scope=<name>|region=<name>|rate=<N>/min|stop> [priority=<0-255>] [tx=slow] [suspend=tempradio]`
- `del flood.rule.<n>`
- `del flood.rule all`
- `get flood.filter`
- `get flood.filter.<n>`
- `get flood.filter.blacklist`
@@ -1684,40 +1645,71 @@ worked moderation examples, see [Repeater Flood Filtering and Moderation](flood_
- `del flood.filter.<n>`
- `del flood.filter all`
The extended table is available on repeaters with the rule engine enabled and
on FULL-profile ESP32 room servers. A FULL room server exposes both
`flood.rule` and `flood.filter`, has 31 slots, and requires an administrator
for remote changes. It does not have the repeater's passive path blacklist, so
`flood.filter.blacklist*` and `path=blacklist` are repeater-only; use the
ordered `prefix=` match on a room server. Standard room-server profiles do not
compile this table.
**Parameters:**
- `n`: Rule slot from `1` to `16`.
- `n`: Rule slot in the build's compiled table (normally `1-31`; some
constrained profiles use fewer slots).
- `type`: Payload type name, full `PAYLOAD_TYPE_*` name, decimal value `0-15`,
hexadecimal value `0x00-0x0F`, or `any`.
- `hops`: Optional; omitted means `all`.
- `N`: Block only at received hop count `N`.
- `N+`: Block at received hop count `N` and higher.
- `N-M`: Block the inclusive received-hop range.
- `all`: Block at every received hop count (`0-63`).
- `N`: Match only at received hop count `N`.
- `N+`: Match at received hop count `N` and higher.
- `N-M`: Match the inclusive received-hop range.
- `all`: Match every received hop count (`0-63`).
- `0+`, `all`, and an omitted hop expression are equivalent. The CLI displays
the saved range as `all`.
- `channel=*|public|#name|128-bit-key|256-bit-key`: Optional authenticated
group-channel match. It applies only to `GRP_TXT`/`GRP_DATA`; `type=any`
plus a channel condition therefore matches only those group types.
- `prefix=<ID[,ID...]>`: Optional ordered source-path prefix of one to three
pbyte IDs. IDs must all be 2, 4, or 6 hex characters, matching a packet's
1-, 2-, or 3-byte pbyte width. `path=<prefix>` is an alias.
- `in=any|none|scoped|allowed|unknown|scope:<name>|region:<name>`: Optional
condition on the original incoming scope, before any rule rewrites it.
`none` is an unscoped flood. `scope:name` is the exact public
hashtag-derived scope. `region:name` is an exact allowed region match.
- `drop`: Explicit drop action. The `flood.rule` form requires an explicit
action. For compatibility, a legacy `flood.filter` row with no rewrite,
rate, or stop action is treated as drop.
- `region=<name>`: Rewrite action using an existing locally allowed region.
- `rate=N/min`: Per-node, per-row fixed one-minute forwarding limit. It can be
the only action or accompany `scope=`/`region=`. Counters are charged only
for packets that pass all forwarding gates.
- `priority=0-255`: Optional processing order. Higher values run first and
lower slot number breaks a tie. The default is `0`; `pri=` is an alias.
- `stop` or `action=stop`: Apply this matching row, then stop lower-order FPF7
rows from processing. It can stand alone or accompany drop, rewrite, or
rate. A stop-only row acts as an exception to lower-priority FPF7 rules.
- `suspend=tempradio`: Optional. Skip this row only while the temporary radio
is actually active.
- `scope=<name>`: Optional scope-setting action. The name is normalized with a
leading `#` and its 128-bit transport key is derived directly from that
hashtag. It does not need to exist in the region list. Public names up to 30
characters are accepted; private `$` scopes are not.
- `require=region`: Optional and valid only with `scope=`. Apply the scope
rewrite only if the original incoming packet already passes this repeater's
- `require=region`: Legacy alias for `in=allowed`. Apply the row only if the
original incoming packet already passes this repeater's
region gate. An incoming transport scope must resolve to a locally allowed
region; an unscoped flood must be allowed by the wildcard region. The check
occurs before any scope rewrite during this receive pass.
- `tx=slow`: Optional and valid only with `scope=`. Use an effective inbound
- `tx=slow`: Optional and valid with `scope=` or `region=`. Use an effective inbound
`rxdelay` base of `max(2, configured rxdelay * 2)`, keep normal outbound
queue priority, and retransmit with the maximum supported `txdelay` factor
of `2.0`. Scope rows default to fast; `tx=fast` explicitly restores that
default when replacing a slow row.
- `path=blacklist`: Optional unordered path condition. The persistent blacklist
contains up to 255 unique 3-byte repeater IDs on ESP32 builds and 18 on other
builds, each written as six hexadecimal digits. A packet with 3-byte path
hashes matches after one exact ID hit. A packet with 2-byte path hashes
matches after two path entries match the first two bytes of listed IDs.
Packets with 1-byte path hashes never match this condition. Each received
path entry is counted at most once.
is repeater-only. It contains up to 255 unique 3-byte repeater IDs on ESP32
builds and 18 on other builds, each written as six hexadecimal digits. A
packet with 3-byte path hashes matches after one exact ID hit. A packet with
2-byte path hashes matches after two path entries match the first two bytes
of listed IDs. Packets with 1-byte path hashes never match this condition.
Each received path entry is counted at most once.
The payload names follow the [MeshCore packet-format allocation](https://docs.meshcore.io/packet_format/):
@@ -1745,16 +1737,21 @@ The payload names follow the [MeshCore packet-format allocation](https://docs.me
`ROUTE_TYPE_FLOOD` (`0x01`, unscoped flood). Direct routes `0x02` and `0x03`
are never affected.
**Behavior:** A row with `path=blacklist` must meet the path condition as well
as its payload-type and hop-range conditions. Blacklist IDs can occur anywhere
in the received path and their configured order is irrelevant. A matching row
without `scope=` prevents retransmission by this
repeater. A matching row with `scope=` instead sets or replaces the packet's
transport scope and does not block it. The lowest-numbered matching scope row
wins; matching drop rows remain independent and can still block the rewritten
packet. Scope rewriting happens before region enforcement and is trusted even
**Behavior:** Match fields within one row are ANDed. Every FPF7 row is matched
against the same immutable receive-time packet, before any rule changes its
scope. Matching rows are processed in descending `priority`, with lower slot
number winning a tie. The first matching `stop` row is included and all
lower-order FPF7 matches are discarded. A stop cannot undo an earlier drop or
bypass hard forwarding gates and separate forwarding tables. A row with
`path=blacklist` must meet the path condition as well as its other conditions;
blacklist IDs can occur anywhere in the received path and their configured
order is irrelevant. In contrast, `prefix=` begins at the first received path
entry and preserves order. A matching drop row prevents retransmission. The
highest-order remaining matching scope/region row wins; matching drop and rate
rows remain independent and can still block the rewritten packet. Scope rewriting
happens before region enforcement and is trusted even
when its name is absent from the local region list. It does not bypass
`repeat`, `flood.max`, other drop rows, channel blocking, loop detection, or
`repeat`, `flood.max`, other drop rows, loop detection, or
moderation.
With `require=region`, a failed check makes that scope row ineligible. It leaves
@@ -1773,13 +1770,26 @@ to ten packet airtimes. Selecting the scope already carried is a no-op and
does not grant special treatment. An active radio transmission is not
preempted, and CAD and airtime-budget limits still apply.
The packet is still received and can still be logged. Rules are persistent.
The packet is still received and can still be logged. Rules are persistent
data and can be changed over serial or authenticated remote CLI without an OTA
or reboot. `flood.rule` and `flood.filter` address the same table on extended
builds; FPF6 files are migrated in memory and the next save writes FPF7.
FPF1-FPF5 files are rejected and filtering fails open. FPF7 stores canonical
region names rather than transient numeric region
IDs. Removing, reordering, or reusing a region ID therefore cannot silently
retarget a rule. If a saved input or target region name is absent, that input
match or rewrite is inert; restoring the same region name reactivates it.
While the temporary radio is active, only rows explicitly marked
`suspend=tempradio` are skipped. `tempradio` is a radio state, not an OTA mode;
normal payload types can also use the temporary channel. Other rows remain in
force. A malformed persisted table fails open (no general rules are applied).
**Default row:** Repeater firmware seeds a new flood-filter table with
Within one receive evaluation, rows that use the same channel key share one
authentication result. The cache is discarded after that packet and stores
neither plaintext nor passwords; different keys are authenticated separately.
**Default row:** Repeater firmware and FULL ESP32 room-server firmware seed a
new flood-filter table with
`ota all suspend=tempradio` in slot 1. This blocks repeated LoRa OTA (`0x0C`)
floods at every received hop unless temporary radio is actually active. The OTA
core independently refuses OTA receive, relay, and transmit outside temporary
@@ -1793,24 +1803,28 @@ set flood.filter.1 0x0C all suspend=tempradio
Omitting `all` is equivalent. Omit `.1` as well to reuse an identical rule or
the first empty slot instead of replacing slot 1.
**Remote-admin protection:** Drop rows cannot block `anon_req`, `path`, or
`response` at received hop counts `0-6`; those login-capable types become
blockable at hop `7`. Flood `txt_msg` cannot be blocked at hops `0-4` and
becomes blockable at hop `5`. Scope-setting rows are non-blocking and may apply
inside these protected ranges. `req`, `ack`, and multipart ACK have no special
protection. Transit repeaters cannot decrypt these packets to distinguish an
admin exchange from ordinary peer traffic, so each floor necessarily covers
all flood packets of that outer type. These exceptions apply only to
`flood.filter` drop actions; `repeat`, `flood.max*`, loop-detection, and other
forwarding gates remain authoritative.
**Remote-admin lockout warning:** There are no hidden payload-type or short-hop
exceptions. FPF7 drop and rate rows may block `req`, `response`, `txt_msg`,
`anon_req`, `path`, ACK, and multipart traffic beginning at hop `0` when their
match fields say so. Transit repeaters cannot decrypt these outer types to
distinguish an admin exchange from ordinary peer traffic. Keep a serial or
other recovery path and stage broad deny/rate rules carefully.
Without `.n`, `set` reuses an existing rule with the same match, scope,
requirement, and suspension settings, or uses the first empty slot. This lets
`tx=slow` or `tx=fast` change that rule's timing without creating a duplicate.
With `.n`, it replaces that slot.
`get flood.filter` gives a compact list. Use `get flood.filter.<n>` for full
details, including `path=blacklist`, `scope=`, and `suspend=tempradio`.
The detail output also includes `require=region` and `tx=slow` when enabled.
Without `.n`, `set` reuses an identical rule or uses the first empty slot. With
`.n`, it replaces that slot, which is the intended way to change a row's match
or action.
`get flood.filter` or `get flood.rule` gives a compact list. Use the numbered
form for full details, including channel, prefix, original-scope condition,
action, timing, rate, and temporary-radio suspension.
If all of those fields plus long names would exceed one CLI reply, the
numbered form automatically switches to a non-truncating compact spelling.
The compact aliases are also accepted by `set`: `c=` means `channel=`, `p=`
means `prefix=`, `i=*|n|s|a|u|s:<scope>|r:<region>` means the corresponding
`in=` condition, `q=N` means `rate=N/min`, `pri=N` means priority, and `f=st`
combines slow timing
(`s`) with temporary-radio suspension (`t`). Packet type is shown numerically
in that fallback. Normal-sized rows keep the descriptive spelling above.
The blacklist and filter rows are persisted separately. Replacing or deleting
the blacklist does not delete rows containing `path=blacklist`; such rows
@@ -1827,12 +1841,16 @@ IDs as fit in one reply; use numbered `get` to inspect entries beyond that
reply.
Standard traceroute is direct-routed and therefore outside `flood.filter`
entirely. For a custom flood-form trace, catch-all `any` rows are deliberately
ignored; only a deliberately explicit `set flood.filter trace ...` row can
match it.
entirely. A custom flood-form trace participates normally: `type=any`, explicit
`trace`, rewrite, rate, drop, and stop rows can all apply.
**Examples:**
```text
set flood.rule.2 type=grp_data hops=4+ channel=#rgdata in=none scope=BlackHole86
set flood.rule.3 type=grp_data channel=#rgdata in=scope:usa scope=BlackHole86
set flood.rule.4 type=any prefix=860C rate=10/min
set flood.rule.5 type=grp_data hops=0-2 channel=#rgdata priority=200 stop
get flood.rule.2
set flood.filter grp_data 4+
set flood.filter.2 PAYLOAD_TYPE_ADVERT 6+
set flood.filter ota 2-4
@@ -1853,6 +1871,19 @@ get flood.filter.2
del flood.filter.2
```
The first rule authenticates `#rgdata`, requires more than three received hops,
and adds `#BlackHole86` only when no scope was present. The second rewrites the
exact incoming `#usa` scope. The third demonstrates a two-byte pbyte source
prefix and a global per-row rate cap. The fourth authenticates `#rgdata` at
zero through two hops, applies no FPF7 action of its own, and stops lower-order
FPF7 rows; hard gates and separate tables still apply.
The fixed 240 KB STM32WL profiles leave
`MESH_ENABLE_FLOOD_RULE_ENGINE=0` and retain the compact, persistent FPF6
`flood.filter` and blacklist commands. They still filter floods, but do not
expose the `flood.rule` alias or its extended channel, prefix, input-scope,
region-action, or rate fields. No partition size changes are required.
---
#### Moderate flood group text by channel, sender, and source path
@@ -1933,7 +1964,8 @@ del flood.moderation.3
**Filter manager scope:** Permission `5` can use an explicit allowlist of
non-secret operational/filter status commands and can change the forwarding
controls `repeat`, `loop.detect`, `flood.max*`, `flood.channel.data*`,
`flood.channel.block*`, `flood.filter*`, and `flood.moderation*`. It cannot read
`flood.filter*`, `flood.rule*`, and
`flood.moderation*`. It cannot read
guest, WiFi, MQTT, bridge, or other credentials, and it cannot change regions,
ACL entries, radio settings, or other admin configuration. Permission `4`
is limited to region commands, `flood.channel.scope*`, and the same non-secret
+279 -112
View File
@@ -1,9 +1,13 @@
# Repeater Flood Filtering and Moderation
# Flood Filtering and Moderation
This guide explains the Keymind repeater forwarding filters. The filters decide
whether this repeater retransmits a packet and can assign a transport scope
before that decision. They do not stop local reception, packet logging, or MQTT
observation.
This guide explains the Keymind forwarding filters. Repeaters expose the full
set of channel, rule, blacklist, and moderation controls described here.
FULL-profile ESP32 room servers expose the generalized `flood.rule` table (and
its `flood.filter` alias) with 31 slots, but not the repeater's channel tables,
passive blacklist, or text-moderation table. Standard room-server profiles do
not compile the rule table. Filters decide whether the node retransmits a
packet and can assign a transport scope before that decision. They do not stop
local reception, packet logging, or MQTT observation.
Only flood routes are filtered:
@@ -18,7 +22,7 @@ OTA assignment noted below.
## Before making changes
Show the current forwarding controls:
On a repeater, show the current forwarding controls:
```text
get repeat
@@ -27,39 +31,63 @@ get flood.max.unscoped
get flood.max.advert
get flood.channel.data
get flood.channel.data.hops
get flood.channel.block
get flood.channel.scope
get flood.channel.scope.require
get flood.filter
get flood.rule
get flood.moderation
```
The `flood.filter` and `flood.moderation` tables each have 16 persistent slots.
A new `flood.filter` table starts with `ota all suspend=tempradio` in slot 1;
`flood.moderation` starts empty. A row can opt into `suspend=tempradio`;
`flood.rule` is an alias for `flood.filter`, not another table. The
The generalized FPF7 table has 31 persistent slots; compact target profiles
may compile fewer FPF6 filter slots. `flood.moderation` has 16 slots. A new
repeater FPF7 table starts with `ota all suspend=tempradio` in slot 1 and an
authenticated `#wardriving hops=5+` drop in slot 2; FULL room servers seed only
the OTA row. `flood.moderation` starts empty. A row can opt into
`suspend=tempradio`;
temporary radio is not synonymous with OTA and can carry normal packet types
too. A corrupt or truncated table fails open, so corrupt storage does not
silently enable blocking.
On a FULL ESP32 room server, use `get flood.rule` (or `get flood.filter`) for
the available table. Remote rule changes require room-server administrator
access. `flood.filter.blacklist*` and `path=blacklist` are repeater-only; use
the ordered `prefix=` condition on a room server.
## Force floods into a transport scope
`flood.channel.scope` can add a scope to a received unscoped flood or replace
the scope of a transport-scoped flood before this repeater forwards it:
```text
set flood.channel.scope <channel|txt:*|login:*|other:*> <region> [path=blacklist|path=bucket:1-6] [tx=slow]
set flood.channel.scope.<slot> <channel|txt:*|login:*|other:*> <region> [path=blacklist|path=bucket:1-6] [tx=slow]
set flood.channel.scope <channel|txt:*|login:*|other:*> <region|scope=name> [path=blacklist|path=bucket:1-6] [tx=slow]
set flood.channel.scope.<slot> <channel|txt:*|login:*|other:*> <region|scope=name> [path=blacklist|path=bucket:1-6] [tx=slow]
get flood.channel.scope
get flood.channel.scope.<slot>
del flood.channel.scope.<slot>
del flood.channel.scope all
```
The channel may be `public`, `#channel`, or a 128/256-bit hex key. The region
must already exist and provide a usable transport key. Keyed rules first check
the one-byte channel hash carried in the packet, then validate the MAC by
decrypting with the configured channel key. A hash collision alone cannot
force a scope.
The channel may be `public`, `#channel`, or a 128/256-bit hex key. A bare
target names an existing region with a usable transport key. Use
`scope=<name>` instead to derive a regionless public hashtag scope exactly as
`flood.filter scope=<name>` does. The direct name is normalized with a leading
`#`, may contain up to 30 characters, and does not need a region-list entry.
Keyed rules first check the one-byte channel hash carried in the packet, then
validate the MAC by decrypting with the configured channel key. A hash
collision alone cannot force a scope.
For example, this authenticates only `#rgdata` and rewrites it to
`#BlackHole86` without creating a region:
```text
set flood.channel.scope #rgdata scope=BlackHole86
get flood.channel.scope.1
```
If that channel arrives scoped to `#usa`, the rule replaces `#usa` with
`#BlackHole86`. It also handles unscoped packets and replaces any other
incoming scope; the source scope is not a condition on the rule.
Add `path=blacklist` to make a channel-scope row eligible only when the
received path matches the passive `flood.filter.blacklist` ID table. It does
@@ -81,11 +109,11 @@ There are three independent wildcard classes:
- `txt:*` handles otherwise-unmatched `GRP_TXT` and `GRP_DATA`; plain `*` is
its alias.
- `login:*` handles `REQ`, `RESPONSE`, `TXT_MSG`, `ANON_REQ`, and `PATH`.
- `other:*` handles every remaining flood payload type except TRACE, including
OTA. TRACE is deliberately exempt from forced-scope wildcards.
- `other:*` handles every remaining flood payload type, including flood-form
TRACE and OTA.
`login:*` and `other:*` classify only the visible outer payload type; they do
not authenticate its contents. Exact channel rows with usable target regions
not authenticate its contents. Exact channel rows with usable targets
always take precedence over `txt:*`, even if that wildcard has a lower slot
number. Within the exact class, matching path-qualified rows are tried before
ordinary fallback rows. The same qualified-then-fallback order applies within
@@ -110,12 +138,14 @@ enabled.
On a successful match, an unscoped route changes from `ROUTE_TYPE_FLOOD` to
`ROUTE_TYPE_TRANSPORT_FLOOD`; an already-scoped route remains transport-flood
but receives replacement codes. Transport code 0 is calculated with the target
region key over the payload type and payload, and code 1 becomes zero. The
region or direct hashtag key over the payload type and payload, and code 1 becomes zero. The
change happens before region enforcement, forwarding filters, and
deduplication. Consequently `flood.max.unscoped` no longer applies to a packet
converted from unscoped, while `flood.max`, target-region permissions,
`flood.filter`, channel blocking, loop detection, and moderation still apply
to every rewritten packet. By default, if the selected scope differs and the
converted from unscoped, while `flood.max`, `flood.filter`, loop detection, and
moderation still apply to every rewritten packet. A region
target must be flood-allowed. A regionless target is trusted for this matched
receive pass, but it neither creates a region nor changes how unrelated packets
with the same transport code pass the region gate. By default, if the selected scope differs and the
rewritten packet passes those checks, its initial retransmission uses zero
`txdelay` and the highest outbound queue priority so the newly scoped copy can
win at the next hop. Add `tx=slow` to use an effective inbound `rxdelay` base
@@ -126,17 +156,19 @@ It does not preempt an active radio transmission or bypass CAD and
airtime-budget limits. Selecting the scope already present is a no-op and does
not grant special treatment.
Direct routes are never rewritten. TRACE is never rewritten even in flood
form; its existing code, if any, is preserved and it bypasses
region/unknown-code enforcement. Scope assignment also does not override
normal payload validation or make an otherwise non-forwardable packet type
forwardable.
Direct routes are never rewritten. Standard traceroute is direct-routed and
therefore remains outside this flood-only table. A custom flood-form TRACE is
treated like every other flood: an applicable wildcard may rewrite it and the
normal region/unknown-code gates still apply. Scope assignment does not
override normal payload validation or make an otherwise non-forwardable
packet type forwardable.
LoRa OTA (`0x0C`) falls under `other:*`. A matching row adds the selected
transport code or replaces the existing one, but OTA still operates normally
during the temporary-radio window because the OTA handler accepts both
unscoped and transport-scoped flood routes. The target region must allow
flooding. A new repeater also seeds `ota all suspend=tempradio` in flood-filter
unscoped and transport-scoped flood routes. A region target must allow
flooding; a direct target uses the regionless trust behavior above. A new
repeater also seeds `ota all suspend=tempradio` in flood-filter
slot 1. That visible rule blocks OTA forwarding at every received hop outside
temporary-radio operation and is skipped while temporary radio is active.
Independently, the OTA core refuses OTA receive, relay, and transmit outside an
@@ -145,17 +177,22 @@ replaced.
Capacity is selected at build time:
- Roomy ESP32 builds: 255 slots, 9,180 bytes RAM, 9,185-byte file.
- Roomy ESP32 builds: 255 rule slots and 32 regionless-target slots, 10,204
bytes RAM, 10,210-byte file.
- DRAM-tight classic ESP32 LoRa-OTA repeaters, nRF52, and other normal
constrained builds: 31 slots, 1,116 bytes RAM, 1,121-byte file.
- Very-tight STM32WL builds: 15 slots, 540 bytes RAM, 545-byte file.
- The no-PSRAM LilyGo T-LoRa V2.1 repeater/observer: 4 slots, 144 bytes RAM,
149-byte file. This minimum holds the three wildcard classes and one exact
channel mapping.
constrained builds: 31 rule and regionless-target slots, 2,108 bytes RAM,
2,114-byte file.
- Very-tight STM32WL builds: 15 rule slots and one reusable regionless-target
slot, 572 bytes RAM, 578-byte file.
- The no-PSRAM LilyGo T-LoRa V2.1 repeater/observer: 4 rule and
regionless-target slots, 272 bytes RAM, 278-byte file. This minimum holds the
three wildcard classes and one exact channel mapping.
The region map still has 32 named-region entries. Large ESP32 tables can map
many channels to the same targets, but cannot reference more than 32 distinct
configured region names.
Each rule retains its 36-byte record. A separate table holds 32-byte normalized
names for up to the smaller of the rule count or 32 distinct regionless
targets, except that very-tight STM32WL builds retain one reusable direct
target. Both configured regions and regionless targets can be reused by any
number of rules.
## Require valid incoming scopes only on selected channels
@@ -183,7 +220,7 @@ cannot rescue it or grant special receive/transmit timing.
Group-channel packets that do not authenticate against any listed key bypass
the region/unknown-code forwarding gate. They still pass through `repeat`,
`flood.max*`, `flood.filter`, `flood.channel.block`, loop detection, payload
`flood.max*`, `flood.filter`, loop detection, payload
validation, and moderation. Non-channel flood payload types retain the normal
global region behavior. A one-byte channel-hash collision is only a prefilter;
the packet must also pass MAC validation/decryption with the configured key.
@@ -225,8 +262,8 @@ of a less-preferred scope it already carried.
Scope selection happens at dequeue so the original scopes remain available for
comparison. It applies only while copies are queued and cannot alter a copy
already processed into the seen table. TRACE is excluded from scope arbitration
entirely, so rxdelay never adds or replaces a trace transport code.
already processed into the seen table. Flood-form TRACE participates in the
same arbitration. Direct traceroute never enters this flood queue.
A packet that already matches a configured fast `flood.channel.scope` or
`flood.filter scope=` action and needs its scope changed bypasses this inbound
@@ -234,10 +271,130 @@ A packet that already matches a configured fast `flood.channel.scope` or
configured base, floored at `2.0`, and participates in normal queued-copy
scope arbitration.
## Filter by payload type, received hop count, and path
## Runtime flood rules
Use `flood.filter` when the packet type, current path length, or listed path
identifiers are enough to make the decision:
On repeaters with the rule engine enabled and on FULL-profile ESP32 room
servers, `flood.rule` and `flood.filter` are two names for the same persistent
table. The evaluator is fixed firmware, but every row is data, so an
authenticated operator can add, replace, inspect, or delete a row without an
OTA or reboot. Existing `flood.filter` commands remain compatible. Only FPF6
and FPF7 files are accepted; FPF1-FPF5 files are rejected and filtering fails
open. A row saved by the extended engine uses FPF7.
The former `flood.channel.block` table is now represented by ordinary FPF7
rows. On a generalized repeater, an existing FCB2 file is imported once into
free FPF7 slots and then removed. For example, an old `#wardriving h=4` row
becomes `type=any channel=#wardriving hops=5+ drop`. The 31 FPF7 slots replace
the former 16 general-filter plus 15 channel-block slots. Compact STM32WL FPF6
builds cannot match authenticated channels.
FPF7 binds `in=region:<name>` and `region=<name>` to canonical region names,
not numeric region IDs. Removing, reordering, or reusing a region ID cannot
silently redirect a rule. If the saved name is missing, an input-region match
does not match and a target-region rewrite is skipped. Re-adding the same name
reactivates the rule.
The extended form is:
```text
set flood.rule[.<slot>] type=<type> [hops=<range>] [channel=<channel>]
[prefix=<ID[,ID...]>] [in=<input-scope>] <action> [rate=<N>/min]
[priority=<0-255>] [stop] [tx=fast|slow] [suspend=tempradio]
get flood.rule
get flood.rule.<slot>
del flood.rule.<slot>
del flood.rule all
```
The command must be entered on one line. Match fields in one row are ANDed.
Every row is matched against the same immutable packet state captured on
receive, before any rule rewrites its scope. Matching rows are then processed
by descending `priority`; lower slot number wins a priority tie. Priority
defaults to `0`.
The first matching `stop` row ends FPF7 processing after that row. Higher-order
matches and the stop row still apply; lower-order matches do not. A stop-only
row is therefore an exception to lower-priority FPF7 rows. It cannot undo a
higher-priority drop and it does not bypass hard forwarding gates or separate
forwarding tables. Without a stop row, matching drop and rate rows remain
independent and the highest-order matching scope or region rewrite wins.
Match fields:
- `type=` accepts the same packet names and numeric values as legacy
`flood.filter`. The positional form remains accepted.
- `hops=` accepts `all`, `N`, `N+`, or `N-M`. The positional form remains
accepted. Received hops over 3 are written as `hops=4+`.
- `channel=*|public|#name|128-bit-key|256-bit-key` authenticates a `GRP_TXT` or
`GRP_DATA` packet with that channel key before the row can match. With
`type=any`, this condition naturally limits the row to those two group
packet types.
- `prefix=` is a source-path prefix containing one to three comma-separated
pbyte IDs. Every ID must use the packet's pbyte width: 2, 4, or 6 hex
characters for 1-, 2-, or 3-byte paths. Order matters and matching begins at
the first received path entry. `path=<prefix>` is an alias;
`path=blacklist` retains its separate unordered-list behavior.
- `in=any|none|scoped|allowed|unknown|scope:<name>|region:<name>` tests the
original incoming route before any rewrite. `none` means an unscoped flood;
`scoped` means any transport flood; `scope:name` compares the exact public
hashtag-derived scope; and `region:name` compares an allowed configured
region. `allowed` is the legacy `require=region` test and includes an
unscoped packet when the wildcard region allows it. `unknown` means a scoped
packet that does not resolve to an allowed local region.
Actions:
- `drop` prevents retransmission when the row matches. The strict
`flood.rule` form requires an explicit action. For backward compatibility,
only a legacy `flood.filter` row with no rewrite, rate, or stop action means
drop implicitly.
- `scope=<name>` assigns a direct public hashtag scope without requiring a
region-list entry.
- `region=<name>` assigns an existing locally allowed region and its transport
key.
- `rate=N/min` is a per-node, per-row fixed one-minute forwarding limit. It can
stand alone or accompany a scope/region rewrite. Quota is charged only after
every other forwarding gate, including moderation, accepts the packet. It is
not keyed per sender; use `flood.moderation` when a group-text rate must be
tied to an exact display name.
- `priority=0-255` controls processing order. Higher values run first; lower
slot number breaks ties. `pri=` is the compact alias.
- `stop` (or `action=stop`) applies this row and prevents lower-order FPF7 rows
from acting. It can stand alone or accompany drop, rewrite, or rate.
When several rows use the same channel key, authentication is performed once
for that packet and reused by those rows. This cache lives only for the current
receive evaluation; it is not persisted and never stores plaintext or a
password.
The exact requested examples are:
```text
# If #rgdata arrives unscoped with more than 3 received hops, add
# the regionless #BlackHole86 scope.
set flood.rule.2 type=grp_data hops=4+ channel=#rgdata in=none scope=BlackHole86
# Rewrite the exact incoming #usa scope to #BlackHole86 for #rgdata.
set flood.rule.3 type=grp_data channel=#rgdata in=scope:usa scope=BlackHole86
# Match a two-byte source-path prefix and cap forwarding at 10 per minute.
set flood.rule.4 type=any prefix=860C rate=10/min
# Keep authenticated #rgdata at two hops or less out of lower-priority FPF7
# rules. Hard gates and separate tables still apply.
set flood.rule.5 type=grp_data hops=0-2 channel=#rgdata priority=200 stop
get flood.rule.2
get flood.rule.3
get flood.rule.4
```
The 240 KB STM32WL profiles keep `MESH_ENABLE_FLOOD_RULE_ENGINE=0` and retain
the persistent compact FPF6 `flood.filter` and blacklist syntax below. They
still perform filtering, but omit the generalized `flood.rule` parser and
extended fields. No partition size is changed by this feature.
The compatible filter and blacklist commands are:
```text
set flood.filter.blacklist <ID[,ID...]>
@@ -277,32 +434,38 @@ of listed IDs. Each received entry is counted at most once. A 1-byte path
never qualifies. The IDs may occur anywhere in the received path; neither
their list order nor their path order matters.
Without a slot number, `set` reuses a rule with the same match, scope,
requirement, and suspension settings, or selects the first empty slot. This
lets `tx=slow` or `tx=fast` change that rule's timing without creating a
duplicate. With a slot number, it replaces that slot. Omitting the hop
expression means `all` (`0-63`).
Without a slot number, `set` reuses an identical row or selects the first empty
slot. Use a slot number to replace a row whose match or action is changing.
Omitting the hop expression means `all` (`0-63`).
A row without `scope=` is the existing drop action. A row with `scope=` is a
scope-setting action instead: it adds transport scope to an unscoped packet or
replaces the codes on an already-scoped packet. The scope name is normalized
Numbered `get` normally uses the long field names. If a rule containing
several maximum-length names would exceed one CLI reply, it switches to a
non-truncating compact spelling that `set` also accepts: `c=` is `channel=`,
`p=` is `prefix=`, `i=*|n|s|a|u|s:<scope>|r:<region>` represents `in=`, `q=N`
is `rate=N/min`, and `f=st` combines slow timing (`s`) and temporary-radio
suspension (`t`). The fallback prints packet type numerically.
A legacy row without `scope=` is the existing drop action. On extended builds,
an explicit `drop` has the same result, while `rate=` by itself creates a
rate-only row. A row with `scope=` adds transport scope to an unscoped packet
or replaces the codes on an already-scoped packet. The scope name is normalized
with a leading `#`, and the 128-bit transport key is derived directly from that
hashtag. The name does not need to exist in the region list and is not added to
it. Public names up to 30 characters are accepted; private `$` scopes are not.
Add `require=region` to a scope row when rewriting must not rescue a packet
that the incoming-region gate would reject. The repeater evaluates the packet's
`require=region` is the legacy spelling of `in=allowed`. The repeater evaluates the packet's
original route before any rewrite in that receive pass. An incoming transport
scope must match a locally allowed region; an unscoped flood must be allowed by
the wildcard region. If the check fails, that scope row is skipped, the filter
does not grant its region bypass, and the unchanged packet is allowed to fail
the wildcard region. If the check fails, that row is skipped, the filter does
not grant a region bypass, and the unchanged packet is allowed to fail
normal region enforcement. Other independently configured scope rows still
apply in their normal order.
When multiple scope rows match, the lowest-numbered row wins. Scope rows do not
approve a packet: any matching drop row and every remaining forwarding gate can
When multiple scope or region rows match, the highest-priority row wins; lower
slot number breaks a priority tie.
Rewrite rows do not approve a packet: any matching drop row and every remaining forwarding gate can
still reject it. A filter-assigned scope is trusted without local region-list
validation, but `repeat`, `flood.max`, channel blocking, loop detection, and
validation, but `repeat`, `flood.max`, loop detection, and
moderation still apply. By default, a changed scope bypasses inbound `rxdelay`,
then is retransmitted with zero `txdelay` and the highest outbound queue
priority. Add `tx=slow` to use an effective inbound `rxdelay` base of
@@ -312,10 +475,13 @@ zero through ten packet airtimes. `tx=fast` explicitly restores the default.
Selecting the scope already present does not grant special treatment. Active
radio transmission, CAD, and airtime-budget limits are unchanged.
The blacklist and rule table are persisted separately. Deleting the blacklist
leaves `path=blacklist` rows in place but dormant until IDs are configured
again. Path hashes are truncated routing identifiers and are not authenticated
proof that a particular repeater handled a packet.
On repeaters, the blacklist and rule table are persisted separately. FPF7
stores compiled match/action fields and canonical region names, not executable
code, a script, or numeric region references. Deleting the blacklist leaves
`path=blacklist` rows in place but dormant until IDs are configured again.
Path hashes are truncated routing identifiers and are not authenticated proof
that a particular repeater handled a packet. FULL room servers have only the
rule table and reject blacklist commands.
On first initialization, flood-filter slot 1 is seeded with:
@@ -333,38 +499,29 @@ on a temporary channel.
Suspension does not approve a packet or bypass the rest of the filter table. It
skips that row, then evaluation continues with the next row and the remaining
forwarding gates. An ordinary drop `any` row therefore still applies during
the temporary-radio window, subject to the short-path remote-admin protection
below. `repeat`, `flood.max*`, region handling, loop detection, and the OTA
the temporary-radio window unless an earlier matching stop row ends FPF7
processing. `repeat`, `flood.max*`, region handling, loop detection, and the OTA
subsystem's own hop limit also remain in force.
Standard traceroute uses direct routing and never enters `flood.filter`. For a
custom flood-form trace, catch-all `any` rows are deliberately ignored; only an
explicit `trace` row can match it. The stock core does not normally
flood-forward TRACE packets.
custom flood-form trace, `type=any`, explicit `trace`, scope, region, rate, and
drop rows all behave normally. The stock core does not normally flood-forward
TRACE packets.
### Remote administration cannot be type-filtered on short paths
### Remote-administration lockout warning
`flood.filter` drop actions use two minimum filterable hop counts:
- `anon_req`, `path`, and `response` cannot be blocked at received hops `0-6`;
configured rules begin applying at hop `7`.
- Flood `txt_msg` cannot be blocked at received hops `0-4`; configured rules
begin applying at hop `5`.
`req`, `ack`, and multipart ACK have no special floor and remain filterable from
hop `0`. Scope-setting rows do not block traffic and may apply within the
protected ranges.
There are no hidden payload-type or short-hop exemptions in FPF7. Drop and
rate rules can block `req`, `response`, `txt_msg`, `anon_req`, `path`, ACK, and
multipart traffic beginning at hop `0` when their match fields say so.
A flooded login starts as `ANON_REQ`; its reply is commonly a `PATH` packet
carrying an encrypted `RESPONSE`. Before a direct return path is established,
administrative replies and CLI text can also be flooded. Transit repeaters do
not have the session key and cannot distinguish those encrypted admin exchanges
from ordinary peer packets with the same outer type. Each hop floor therefore
covers the complete outer packet class, not only packets that ultimately
authenticate as administrators.
This protects only against configurable `flood.filter` drop actions. It does
not override `repeat`, `flood.max*`, loop detection, or other forwarding gates.
from ordinary peer packets with the same outer type. A rule therefore affects
the complete outer packet class, not only packets that ultimately authenticate
as administrators. Keep a serial or other recovery path and stage broad
deny/rate rules carefully.
Hop expressions are based on the path count when this repeater receives the
packet:
@@ -431,9 +588,9 @@ get flood.filter
On a new table, the factory OTA rule occupies slot 1, so these unnumbered
commands normally fill slots 2 through 7. Existing tables may choose different
free slots. The `response`, `anon_req`, and `path` thresholds are above their
protected `0-6` range, so all six rules take effect at the thresholds shown.
The Control rule allows a flood received with path count `0` to be forwarded
free slots. All six rules take effect at the thresholds shown; there are no
hidden short-hop exceptions. The Control rule allows a flood received with
path count `0` to be forwarded
once, then stops it at the next repeater. Normal node-discovery Control packets
are direct zero-hop packets and never enter `flood.filter`. These rules affect
only retransmission by the repeater; local reception and logging remain
@@ -542,18 +699,23 @@ other words, the controls combine as deny rules:
original incoming scope; unlisted group channels bypass the later region
gate while the table is active.
2. `flood.channel.scope` tries a path-qualified channel row before that
channel's ordinary fallback, then adds or replaces the scope.
3. A matching `flood.filter scope=` row may replace that result; its scope does
not require a region-list entry.
channel's ordinary fallback, then adds or replaces the scope from either a
configured region or a direct `scope=<name>` target.
3. All extended `flood.rule` match fields are evaluated against the same
original incoming packet. Matches are ordered by descending priority and
then ascending slot. The first matching `stop` row removes every later FPF7
match. The highest-order remaining `scope=` or `region=` row may replace the
channel-scope result; a direct scope does not require a region-list entry.
4. `repeat`, `flood.max*`, and the channel-data gate are checked.
5. `flood.filter` drop rows check payload type and hop range, subject to the
login floor of `7` and flood-text floor of `5` described above.
6. `flood.channel.block` checks keyed channels.
7. Region and loop-detection rules are checked; a filter-assigned scope is
already trusted when it has no region-list match, except that it cannot
rescue a channel rejected by `flood.channel.scope.require`.
8. `flood.moderation` checks decrypted group text, username, rate, hops, and
path.
5. Remaining `flood.filter`/`flood.rule` drop and rate rows use that saved
match result. No packet type or short-hop range is silently exempted.
6. Region and loop-detection rules are checked; a regionless scope assigned by
either table is already trusted when it has no region-list match, except
that it cannot rescue a channel rejected by
`flood.channel.scope.require`.
7. `flood.moderation` checks decrypted group text, username, rate, hops, and
path. If it accepts the packet, matching general-rule rate counters are
charged immediately before retransmission is approved.
The first denial is enough to prevent retransmission. A packet that is denied
can still appear in local logs or MQTT output. Moderation runs last because its
@@ -562,25 +724,30 @@ control and will actually be retransmitted.
## Delegate filter management
ACL permission `5` is the filter-manager role:
On repeaters, ACL permission `5` is the filter-manager role:
```text
setperm <companion-public-key-hex> 5
```
A filter manager can read non-secret operational status and manage `repeat`,
`loop.detect`, `flood.max*`, `flood.channel.data*`, `flood.channel.block*`,
`flood.filter*`, and `flood.moderation*`. Delegated `get` access uses an
`loop.detect`, `flood.max*`, `flood.channel.data*`,
`flood.filter*`, `flood.rule*`, and `flood.moderation*`. Delegated `get` access uses an
explicit allowlist: it cannot retrieve guest, WiFi, MQTT, bridge, or other
credentials, and it cannot change regions, ACL entries, radio settings, or
unrelated administrator settings. Because `flood.filter scope=` derives a
public hashtag key directly, a filter manager can configure that action without
region-manager permission; it still cannot edit the region hierarchy.
FULL ESP32 room servers use their existing administrator check for remote
`flood.rule` and `flood.filter` commands; they do not grant this table through
permission `5`.
ACL permission `4`, the region/scope-manager role, can read, add, replace, and
delete `flood.channel.scope` and `flood.channel.scope.require` rows and manage
regions. This lets the same delegate create target regions, assign forced
scopes, and select the channels that require valid incoming scopes.
scopes from regions or direct hashtag names, and select the channels that
require valid incoming scopes.
## Security limitations
@@ -599,13 +766,13 @@ private transport/channel keys, and controlled device access.
The repeater's factory-seeded forwarding rows can be restored through the CLI:
```text
set flood.channel.block.1 #wardriving h=4
set flood.filter.1 0x0C all suspend=tempradio
set flood.rule.1 type=ota hops=all drop suspend=tempradio
set flood.rule.2 type=any channel=#wardriving hops=5+ drop
```
Each command explicitly replaces slot 1 in its own table. Inspect the slot first
if it may now contain another rule. To preserve existing slot assignments, omit
`.1`; the command then reuses an identical row or uses the first empty slot.
These commands explicitly replace the two seeded generalized-repeater slots.
Inspect them first if they may now contain other rules. Compact FPF6 builds use
only the first command's `flood.filter.1 0x0C all suspend=tempradio` form.
## Remove the custom rules
@@ -618,5 +785,5 @@ get flood.filter
get flood.moderation
```
This does not change the older `flood.max*`, channel-block, loop-detection, or
region settings; inspect or reset those separately when troubleshooting.
This does not change the older `flood.max*`, loop-detection, or region settings;
inspect or reset those separately when troubleshooting.
+4 -5
View File
@@ -80,13 +80,12 @@ set flood.retry.ignore none
| `battery.alert.low` | Warning threshold percentage. Must be greater than `battery.alert.critical`. | `get battery.alert.low`, `set battery.alert.low <1-100>` | `set battery.alert.low 20` |
| `battery.alert.critical` | Critical threshold percentage. Critical and warning alerts use the same 12-hour resend cooldown. | `get battery.alert.critical`, `set battery.alert.critical <0-99>` | `set battery.alert.critical 10` |
| `recent.repeater` | Shows, searches, seeds, or clears the recent repeater prefix/SNR table used by direct retry and bridge freshness checks. Search results include the last-recorded age. Entries older than 24 hours are removed by a three-hour sweep. | `get recent.repeater [page]`, `get recent.repeaters search <2|4|6 hex> [page]`, `set recent.repeater <prefix> <snr_db>`, `clear recent.repeater` | `get recent.repeaters search A1B2` |
| `flood.channel.data` | Turns forwarding of flood `GRP_DATA` channel packets on or off. With the default `on`, `GRP_DATA` repeats normally even when `flood.channel.block.hops` is set. | `get flood.channel.data`, `set flood.channel.data on/off` | `set flood.channel.data off` |
| `flood.channel.data` | Turns forwarding of all flood `GRP_DATA` channel packets on or off. The default is `on`; use an authenticated FPF7 `channel=` drop when only selected channels should be blocked. | `get flood.channel.data`, `set flood.channel.data on/off` | `set flood.channel.data off` |
| `flood.channel.data.hops` | Separate hop gate used only when `flood.channel.data` is `off`; `all` blocks `GRP_DATA` at any hop count, `1`-`7` repeats at that hop count or lower and blocks longer paths. | `get flood.channel.data.hops`, `set flood.channel.data.hops <all|1-7>` | `set flood.channel.data.hops 7` |
| `flood.channel.block` | Blocks selected flood `GRP_TXT`/`GRP_DATA` channels when the key validates the packet. New repeater block lists start with editable/deletable `#wardriving h=4`. Add `h=<all|1-7|default>` for a per-channel hop override. | `get flood.channel.block`, `set flood.channel.block[.n] <key|#channel> [name] [h=...]`, `del flood.channel.block[.n]` | `set flood.channel.block #wardriving h=4` |
| `flood.channel.block.hops` | Limits keyed channel-block matches to short flood paths. `all` blocks matching packets at any hop count; `1`-`7` repeats packets at that hop count or lower and blocks longer matches. This does not restrict unkeyed `GRP_DATA`; use `flood.channel.data.hops` for that. | `get flood.channel.block.hops`, `set flood.channel.block.hops <all|1-7>` | `set flood.channel.block.hops 3` |
| `flood.channel.scope` | Adds a transport-region scope to received unscoped floods or replaces the scope of already-scoped floods. By default, a changed packet bypasses inbound `rxdelay` and is forwarded at the highest outbound queue priority with zero initial `txdelay`, so the selected scope can win at the next hop. `tx=slow` uses an effective inbound `rxdelay` base of `max(2, configured rxdelay * 2)`, retains normal queue priority, and forces the maximum `txdelay` factor of `2.0`; its actual randomized transmit delay ranges from zero through ten packet airtimes. `path=blacklist` and `path=bucket:<1-6>` make a row path-qualified; bridge buckets remain usable while bridge retry is off. An already-matching scope is a no-op. Exact channel keys beat `txt:*`; path-qualified rows beat the ordinary channel fallback. `login:*` covers the remote-login family, and `other:*` covers every remaining flood type except TRACE, including OTA. TRACE remains unchanged across scope boundaries. ACL permission `4` can manage the table. | `get flood.channel.scope[.n]`, `set flood.channel.scope[.n] <channel|txt:*|login:*|other:*> <region> [path=blacklist|path=bucket:1-6] [tx=slow]`, `del flood.channel.scope.<n>|all` | `set flood.channel.scope public east path=bucket:1` |
| `flood.channel.scope` | Adds a transport scope to received unscoped floods or replaces the scope of already-scoped floods. A bare target uses an existing flood-allowed region; `scope=<name>` derives a public hashtag target directly without creating a region, exactly like `flood.filter scope=`. By default, a changed packet bypasses inbound `rxdelay` and is forwarded at the highest outbound queue priority with zero initial `txdelay`, so the selected scope can win at the next hop. `tx=slow` uses an effective inbound `rxdelay` base of `max(2, configured rxdelay * 2)`, retains normal queue priority, and forces the maximum `txdelay` factor of `2.0`; its actual randomized transmit delay ranges from zero through ten packet airtimes. `path=blacklist` and `path=bucket:<1-6>` make a row path-qualified; bridge buckets remain usable while bridge retry is off. An already-matching scope is a no-op. Exact channel keys beat `txt:*`; path-qualified rows beat the ordinary channel fallback. `login:*` covers the remote-login family, and `other:*` covers every remaining flood type, including flood-form TRACE and OTA. Direct traceroute remains outside the flood table. ACL permission `4` can manage the table. | `get flood.channel.scope[.n]`, `set flood.channel.scope[.n] <channel|txt:*|login:*|other:*> <region|scope=name> [path=blacklist|path=bucket:1-6] [tx=slow]`, `del flood.channel.scope.<n>|all` | `set flood.channel.scope #rgdata scope=BlackHole86` |
| `flood.channel.scope.require` | Switches group-channel region enforcement to opt-in when the table has entries. Listed authenticated `GRP_TXT`/`GRP_DATA` channels must arrive already scoped to a locally allowed region; unscoped, unknown, or denied incoming scopes are dropped before any rewrite can rescue them. Unlisted group channels bypass only the region gate and retain all other forwarding controls. An empty table preserves global region behavior; non-channel payloads are unchanged. ACL permission `4` can manage the table. | `get flood.channel.scope.require[.n]`, `set flood.channel.scope.require[.n] <public|#channel|key>`, `del flood.channel.scope.require.<n>|all` | `set flood.channel.scope.require #bot` |
| `flood.filter` | Persistent repeater-only rules for flood routes `0x00`/`0x01`, selected by payload type, optional received hop count/range (omitted means `all`), and optional unordered `path=blacklist`. The separate blacklist stores up to 255 full 3-byte repeater IDs on ESP32 and 18 on other builds; the path condition qualifies on at least one exact 3-byte hit, at least two 2-byte-prefix hits, and never on 1-byte paths. Rows normally drop matching retransmissions; `scope=<name>` instead adds or replaces a public hashtag-derived scope without requiring a region-list entry. Scope rewrites default to bypassing inbound `rxdelay` and using zero initial `txdelay` plus highest queue priority; `tx=slow` uses an effective inbound `rxdelay` base of `max(2, configured rxdelay * 2)`, retains normal queue priority, and forces `txdelay` factor `2.0`. Adding `require=region` makes that rewrite conditional on the original incoming packet already passing local region enforcement, so unknown or denied incoming scopes are not rescued. New tables seed slot 1 with `ota all suspend=tempradio`; only rows marked `suspend=tempradio` are skipped during temporary-radio operation. Login-capable `anon_req`/`path`/`response` drop actions begin at hop `7`; flood `txt_msg` drops begin at hop `5`. Standard direct traceroute, other direct routing, and local receive/logging are unchanged. | `get/set/del flood.filter.blacklist[.n]`, `get flood.filter[.n]`, `set flood.filter[.n] <type> [N|N+|N-M|all] [path=blacklist] [scope=<name>] [require=region] [tx=slow] [suspend=tempradio]`, `del flood.filter.<n>|all` | `set flood.filter grp_txt all scope=local tx=slow` |
| `flood.filter` | Persistent flood-route rules selected by payload type and optional hop range. Extended builds have 31 FPF7 slots and add authenticated channel, ordered pbyte prefix, original scope/region, rewrite, rate, priority, and terminal stop fields; `flood.rule` is an alias for the same table. Repeaters also support a separate unordered `path=blacklist`. FULL ESP32 room servers have the same 31 extended slots but no blacklist and require remote administrator access. Fixed 240 KB STM32WL repeaters retain compact FPF6 filtering and blacklist commands. New generalized repeater tables seed slot 1 with `ota all suspend=tempradio` and slot 2 with an authenticated `#wardriving hops=5+` drop. Direct routes and local receive/logging are unchanged. | `get flood.filter[.n]`, `set flood.filter[.n] <type> [N|N+|N-M|all] [scope=<name>] [require=region] [tx=slow] [suspend=tempradio]`, `del flood.filter.<n>|all`; repeater only: `get/set/del flood.filter.blacklist[.n]` | `set flood.filter grp_txt all scope=local tx=slow` |
| `flood.rule` | Live alias for extended `flood.filter` on rule-engine repeaters and FULL ESP32 room servers. A row can AND packet type, hop range, authenticated group channel, ordered 1/2/3-byte pbyte source prefix, and original scope/region conditions, then drop, rewrite to a direct scope or configured region, enforce a per-row rate, and/or stop lower-priority FPF7 rules. All rows match the original receive-time packet; higher `priority` runs first and lower slot breaks a tie. Repeated rows with one channel key share a per-packet authentication result. Persistent FPF7 stores canonical region names, so region ID reorder or reuse cannot retarget a rule. A missing saved region name makes that match or rewrite inert until the name returns. Fixed 240 KB STM32WL profiles keep FPF6 and do not expose this alias; partition sizes are unchanged. | `get flood.rule[.n]`, `set flood.rule[.n] type=<type> [hops=...] [channel=...] [prefix=...] [in=...] <drop|scope=...|region=...|rate=N/min|stop> [priority=0-255]`, `del flood.rule.<n>|all` | `set flood.rule.2 type=grp_data hops=4+ channel=#rgdata in=none scope=BlackHole86` |
| `flood.moderation` | Decrypts keyed `GRP_TXT` channels and applies drop, per-username messages/minute, and maximum-hop controls, optionally matched against the first 1-3 path hashes. Supports `public`, `#channel`, and 128/256-bit channel keys. Sender names and truncated path hashes are moderation hints, not authenticated identities. | `get flood.moderation[.n]`, `set flood.moderation[.n] <channel> <sender> <drop|rate=X/min|hops=N> [path=...]`, `del flood.moderation.<n>|all` | `set flood.moderation public "Noisy User" rate=5/min hops=4` |
| `clock.sync.mesh` | Defaults on for nRF52 repeaters and off for other builds; a saved setting overrides that default. It estimates UTC as soon as the configured number of fresh signed-advert or valid Public-channel sources is collected, with a 30-minute bootstrap/retry timer when evidence is still insufficient, then repeats lazily seven days after each successful estimate. New evidence retriggers evaluation after a no-consensus result. `clock.sync.mesh now` queues an immediate LoRa-only attempt without bypassing quorum or source suppression. Only timestamps from firmware build time through build time plus ten years are recorded. Successful CLI, GPS, or WiFi/NTP clock updates suppress LoRa time collection until reboot; after reboot LoRa is the fallback if NTP cannot sync. Status reports the reason a clock was not set; its `.table` and `.1` through `.16` forms inspect collected samples. | `get clock.sync.mesh`, `set clock.sync.mesh <on|off>`, `clock.sync.mesh now`, `get clock.sync.status[.table|.1-.16]` | `set clock.sync.mesh on` |
| `clock.sync.mesh.edge` | Defaults on so edge repeaters can collect clock evidence when all packets arrive through one relay path. Verified evidence is observed before the forwarding decision, so `repeat off` and forwarding filters do not prevent collection. Signed adverts are deduplicated by public key and Public-channel timestamps by case-insensitive display name; all may share one receive path. Public display names are unauthenticated and can be spoofed. Changing this setting clears current clock samples. | `get clock.sync.mesh.edge`, `set clock.sync.mesh.edge <on|off>` | `set clock.sync.mesh.edge on` |
+16 -1
View File
@@ -59,7 +59,15 @@ Appdata Flags
## Acknowledgement
An acknowledgement that a message was received. Note that for returned path messages, an acknowledgement can be sent in the "extra" payload (see [Returned Path](#returned-path)) instead of as a separate acknowledgement packet. CLI commands do not cause acknowledgement responses, neither discrete nor extra.
An acknowledgement that a message was received. Note that for returned path messages, an acknowledgement can be sent in the "extra" payload (see [Returned Path](#returned-path)) instead of as a separate acknowledgement packet. Current `CLI_DATA` commands do not cause acknowledgement responses, neither discrete nor extra; their text reply is the application-level result. Repeaters still ACK the legacy plain-text form before processing it.
Repeater remote CLI keeps one volatile copy of the most recently completed
reply, keyed by the authenticated sender, request timestamp, and command text.
Repeating that same logical request re-sends the text reply without executing
the command again. A retry must therefore preserve the original timestamp and
command text. The cache is cleared by reboot and replaced by the next completed
remote command; commands that intentionally produce no text reply remain
silent.
| Field | Size (bytes) | Description |
|----------|--------------|------------------------------------------------------------|
@@ -174,6 +182,13 @@ txt_type
| `0x01` | CLI command | the command text of the message |
| `0x02` | signed plain text message | first four bytes is sender pubkey prefix, followed by plain text message |
For a room post, companion firmware uses its own monotonic clock for the
on-air timestamp and preserves that timestamp across application retries. Room
servers track post timestamps separately from login, request, and CLI traffic.
They also remember recent accepted posts by sender, timestamp, and text: an
exact retry is ACKed again without storing a duplicate, while stale or
same-timestamp mismatches are rejected.
## Anonymous request
| Field | Size (bytes) | Description |