feat: add selective flood retry rules
This commit is contained in:
1 parent
65e40ff05f
commit
605b245eb5
17 files changed
+597
-62
No files matched your search
@@ -143,6 +143,8 @@
|
||||
}
|
||||
if (channel === "*") return "";
|
||||
if (channel.toLowerCase() === "public") return "public";
|
||||
const hashMatch = channel.match(/^(?:(?:hash|short):)?([0-9a-fA-F]{2})$/i);
|
||||
if (hashMatch) return `hash:${hashMatch[1].toUpperCase()}`;
|
||||
if (channel[0] === "#") {
|
||||
if (channel.length < 2 || channel.length > 31 || /\s/.test(channel)) {
|
||||
throw new FilterToolError("A hashtag channel must be 1-30 non-space characters after #.");
|
||||
@@ -150,7 +152,7 @@
|
||||
return channel;
|
||||
}
|
||||
if (/^(?:[0-9a-fA-F]{32}|[0-9a-fA-F]{64})$/.test(channel)) return channel.toUpperCase();
|
||||
throw new FilterToolError("Channel must be *, public, #channel, or a 128/256-bit hexadecimal key.");
|
||||
throw new FilterToolError("Channel must be *, public, #channel, hash:XX, or a 128/256-bit hexadecimal key.");
|
||||
}
|
||||
|
||||
function normalizeScopeName(value) {
|
||||
@@ -526,6 +528,7 @@
|
||||
function channelDescription(channel) {
|
||||
if (channel === "public") return "the Public channel";
|
||||
if (channel.startsWith("#")) return `the ${channel} channel`;
|
||||
if (channel.startsWith("hash:")) return `unauthenticated channel hash ${channel.slice(5)}`;
|
||||
return `channel key ${channel.slice(0, 8)}...`;
|
||||
}
|
||||
|
||||
@@ -597,6 +600,7 @@
|
||||
}
|
||||
if (rule.type === "class:other") warnings.push("class:other intentionally includes current and future types outside group and login classes, including OTA.");
|
||||
if (rule.channel && rule.type === "any") warnings.push("A channel condition narrows type=any to group text/data packets on that channel.");
|
||||
if (rule.channel.startsWith("hash:")) warnings.push("A one-byte channel hash is unauthenticated, collision-prone, and sender-selectable; it is never promoted to a known channel identity (hash:11 is not Public). A name or key checks the channel MAC but does not authenticate an individual sender.");
|
||||
if (rule.sender) warnings.push("Displayed sender names are spoofable and are moderation signals, not identities.");
|
||||
if (rule.pathKind !== "none") warnings.push("Pbyte and path-table matches use truncated routing hints, not authenticated identities.");
|
||||
if (rule.pathKind.startsWith("bucket:")) warnings.push("The selected bucket must exist on the target node; the policy stores a reference, not its IDs.");
|
||||
@@ -610,7 +614,7 @@
|
||||
const rule = normalizeRule(input);
|
||||
let bytes = 12;
|
||||
bytes += 3 + 3 + 3;
|
||||
if (rule.channel) bytes += 3 + (rule.channel.length === 32 || rule.channel.length === 64 ? rule.channel.length / 2 : rule.channel.length);
|
||||
if (rule.channel) bytes += 3 + (rule.channel.startsWith("hash:") ? 1 : rule.channel.length === 32 || rule.channel.length === 64 ? rule.channel.length / 2 : rule.channel.length);
|
||||
if (rule.incoming !== "any") bytes += 3 + rule.incoming.length;
|
||||
if (rule.pathKind === "prefix") bytes += 4 + rule.pathPrefix.replace(/,/g, "").length / 2;
|
||||
else if (rule.pathKind !== "none") bytes += 3;
|
||||
@@ -892,8 +896,11 @@
|
||||
if (transportCodes.length) {
|
||||
notes.push("Transport codes are on the wire, but a local region/scope table is required to resolve their names and allow status.");
|
||||
}
|
||||
const channelHash = GROUP_TYPES.includes(type) && payload.length > 0
|
||||
? `hash:${bytesToHex(payload, 0, 1)}`
|
||||
: "";
|
||||
if (GROUP_TYPES.includes(type)) {
|
||||
notes.push("A raw channel hash alone is insufficient to identify a channel; the matching channel key is required.");
|
||||
notes.push("The visible one-byte channel hash can drive an unauthenticated hash:XX rule; a matching channel key is still required to identify and authenticate the channel.");
|
||||
}
|
||||
if (["req", "response", "txt_msg", "path", "grp_txt", "grp_data", "anon_req"].includes(type)) {
|
||||
notes.push("Encrypted content, including a displayed sender, cannot be recovered without the appropriate key.");
|
||||
@@ -924,6 +931,7 @@
|
||||
pathHex: bytesToHex(pathBytes),
|
||||
payloadLength: payload.length,
|
||||
payloadHex: bytesToHex(payload),
|
||||
channelHash,
|
||||
payloadFields: envelope.fields,
|
||||
notes,
|
||||
};
|
||||
@@ -1560,7 +1568,7 @@
|
||||
packetField("type").value = decoded.type;
|
||||
packetField("hops").value = String(decoded.hops);
|
||||
packetField("path").value = decoded.pathIds.join(",");
|
||||
packetField("channel").value = "";
|
||||
packetField("channel").value = decoded.channelHash;
|
||||
packetField("scope-status").value = decoded.routeCode === 0 ? "unknown" : "none";
|
||||
packetField("scope-name").value = "";
|
||||
packetField("region-name").value = "";
|
||||
|
||||
+49
-5
@@ -1952,7 +1952,7 @@ worked moderation examples, see [Flood Filtering and Moderation](flood_filtering
|
||||
**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]`
|
||||
- `set flood.rule[.<n>] type=<type> [hops=<range>] [channel=<channel>] [prefix=<path-prefix>] [in=<input-scope>] <drop|scope=<name>|region=<name>|rate=<N>/min|retry|stop> [priority=<0-255>] [tx=slow] [suspend=tempradio]`
|
||||
- `del flood.rule.<n>`
|
||||
- `del flood.rule all`
|
||||
- `get flood.filter`
|
||||
@@ -1988,11 +1988,21 @@ compile this table.
|
||||
- `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 channel match.
|
||||
- `channel=*|public|#name|hash:XX|128-bit-key|256-bit-key`: Optional channel match.
|
||||
`channel=*` means no channel condition at all, so the row matches everything
|
||||
selected by `type=` (including all flood payload types with `type=any`). It
|
||||
does not authenticate a packet. `public`, `#name`, and raw keys authenticate
|
||||
one channel and therefore narrow the row to `GRP_TXT`/`GRP_DATA`.
|
||||
`hash:XX` matches only the visible one-byte group-channel hash; `short:XX`
|
||||
and a bare two-digit byte are accepted aliases and are displayed as
|
||||
`hash:XX`. This form is deliberately unauthenticated. It can collide with
|
||||
another channel once in 256 hash values, and a sender can choose the byte,
|
||||
so use an exact channel name or key whenever it is available. In particular,
|
||||
`channel=hash:11` does not mean Public: it matches Public plus every collision
|
||||
or deliberately selected `0x11` value. `channel=public` performs the deeper
|
||||
MAC/decrypt check with the Public channel key. That distinguishes an ordinary
|
||||
`0x11` collision, but it is channel authentication rather than sender
|
||||
authentication: the group MAC is two bytes and the Public key is shared.
|
||||
- `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.
|
||||
@@ -2012,6 +2022,14 @@ compile this table.
|
||||
- `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.
|
||||
- `retry`, `retry=on`, `retry=allow`, or `action=retry`: Allow a matching
|
||||
received flood packet to enter the configured flood-retry sequence. With no
|
||||
active `retry` rows, retry eligibility remains backward compatible and is
|
||||
controlled by the global retry settings. Once any active `retry` row exists,
|
||||
the matching rows become a retry allow-list: a received flood must match at
|
||||
least one surviving `retry` row. `flood.retry.bridge` still selects ordinary
|
||||
or bridge-bucket completion for the allowed packet. This action can accompany
|
||||
rewrite, rate, or stop, but not `drop`; compact syntax uses `f=r`.
|
||||
- `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
|
||||
@@ -2084,6 +2102,13 @@ when its name is absent from the local region list. It does not bypass
|
||||
`repeat`, `flood.max`, other drop rows, loop detection, or
|
||||
moderation.
|
||||
|
||||
Retry selection uses that same ordered, stop-truncated match set. With at least
|
||||
one active `retry` row, a received flood starts a retry sequence only when one
|
||||
of those matching rows includes `retry`. This selector cannot override
|
||||
`flood.retry.count`, path/type attempt caps, `flood.retry.advert`, disabled
|
||||
forwarding, a drop decision, or any other hard forwarding gate. Locally
|
||||
originated floods retain the normal global retry behavior.
|
||||
|
||||
With `require=region`, a failed check makes that scope row ineligible. It leaves
|
||||
the packet unchanged and does not set the filter-scope trust bypass, so an
|
||||
unknown or denied incoming region is rejected normally unless another
|
||||
@@ -2117,6 +2142,25 @@ force. A malformed persisted table fails open (no general rules are applied).
|
||||
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.
|
||||
Raw `hash:XX` rows skip this authentication and compare only the one visible
|
||||
byte.
|
||||
|
||||
**Per-channel retry examples:**
|
||||
|
||||
```text
|
||||
# Use bridge-bucket retry only for authenticated Public and #hamradio traffic.
|
||||
set flood.retry.bridge on
|
||||
set flood.rule.2 type=any channel=public retry
|
||||
set flood.rule.3 type=any channel=#hamradio retry
|
||||
|
||||
# If the channel key/name is unavailable, select visible channel hash A7.
|
||||
# This is an unauthenticated 1-byte hint, not a channel identity.
|
||||
set flood.rule.4 type=any channel=hash:A7 retry
|
||||
```
|
||||
|
||||
Deleting or replacing the last active `retry` row restores the legacy global
|
||||
retry eligibility. Firmware that predates the `retry`/`hash:XX` FPF7 extension
|
||||
cannot preserve tables containing those rows; remove them before downgrading.
|
||||
|
||||
**Default row:** Repeater firmware and FULL ESP32 room-server firmware seed a
|
||||
new flood-filter table with
|
||||
@@ -2151,9 +2195,9 @@ 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=` condition, `q=N` means `rate=N/min`, `pri=N` means priority, and `f=str`
|
||||
combines slow timing (`s`), temporary-radio suspension (`t`), and retry
|
||||
allowance (`r`). Packet type is shown numerically
|
||||
in that fallback. Normal-sized rows keep the descriptive spelling above.
|
||||
|
||||
On generalized repeaters, filter rows, scope-rewrite rows, the shared
|
||||
|
||||
+3
-3
@@ -65,7 +65,7 @@ in the simulator below. The examples draw from
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td><code>hops=</code></td><td>Received hop count: <code>all</code>, <code>3+</code>, <code>2-6</code>, or <code>3</code></td></tr>
|
||||
<tr><td><code>channel=</code></td><td><code>*</code> means no channel condition; a name or key authenticates one group channel</td></tr>
|
||||
<tr><td><code>channel=</code></td><td><code>*</code> means no channel condition; a name or key authenticates one group channel; <code>hash:XX</code> is an unauthenticated one-byte fallback</td></tr>
|
||||
<tr><td><code>rx.scope=</code></td><td>Original incoming transport scope</td></tr>
|
||||
<tr><td><code>path=</code></td><td>Path prefix, blacklist, bucket, or loop match</td></tr>
|
||||
<tr><td><code>tempradio=</code></td><td>Temporary-radio state</td></tr>
|
||||
@@ -164,7 +164,7 @@ in the simulator below. The examples draw from
|
||||
</label>
|
||||
<label>
|
||||
Channel (optional)
|
||||
<input data-field="channel" placeholder="*, #rgdata, public, or key">
|
||||
<input data-field="channel" placeholder="*, #rgdata, public, hash:A7, or key">
|
||||
</label>
|
||||
<label>
|
||||
Original incoming scope
|
||||
@@ -471,7 +471,7 @@ in the simulator below. The examples draw from
|
||||
</label>
|
||||
<label>
|
||||
Channel
|
||||
<input data-packet="channel" value="#rgdata" placeholder="blank if none">
|
||||
<input data-packet="channel" value="#rgdata" placeholder="#name, public, hash:A7, key, or blank">
|
||||
</label>
|
||||
<label>
|
||||
Received pbyte path
|
||||
|
||||
+38
-5
@@ -286,6 +286,8 @@ 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.
|
||||
Older firmware cannot preserve an FPF7 table containing the packed `retry`
|
||||
action or one-byte `hash:XX` matcher; remove those rows before downgrading.
|
||||
|
||||
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
|
||||
@@ -340,12 +342,19 @@ Match fields:
|
||||
`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` optionally narrows by
|
||||
- `channel=*|public|#name|hash:XX|128-bit-key|256-bit-key` optionally narrows by
|
||||
channel. `channel=*` is an unconstrained wildcard: it performs no channel
|
||||
authentication and matches every payload selected by `type=`. Thus
|
||||
`type=any channel=*` means every flood payload type. `public`, `#name`, and
|
||||
raw keys authenticate one channel and narrow the row to `GRP_TXT` or
|
||||
`GRP_DATA`.
|
||||
`GRP_DATA`. `hash:XX` compares only the visible one-byte group-channel hash.
|
||||
`short:XX` and a bare two-digit byte are aliases; saved output uses
|
||||
`hash:XX`. This matcher is unauthenticated, has a 1-in-256 collision space,
|
||||
and can be selected by a sender, so prefer an exact name or key when known.
|
||||
`hash:11` is not an alias for Public: it includes Public and every `0x11`
|
||||
collision, while `public` verifies and decrypts with the Public key. This is
|
||||
channel authentication, not sender authentication: the group MAC is two
|
||||
bytes and the Public key is shared.
|
||||
- `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
|
||||
@@ -377,6 +386,12 @@ Actions:
|
||||
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.
|
||||
- `retry` allows a matching received flood to start the configured retry
|
||||
sequence. `retry=on`, `retry=allow`, and `action=retry` are aliases. If the
|
||||
table has no active `retry` rows, global retry behavior is unchanged. If it
|
||||
has one or more, those rows are a retry allow-list: at least one must remain
|
||||
in the ordered, stop-truncated match set. The action may accompany rewrite,
|
||||
rate, or stop, but not `drop`; its compact flag is `f=r`.
|
||||
- `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
|
||||
@@ -385,7 +400,15 @@ Actions:
|
||||
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.
|
||||
password. A `hash:XX` row deliberately skips authentication and uses only the
|
||||
one visible byte.
|
||||
|
||||
The global retry controls remain hard gates. A `retry` row does not override a
|
||||
zero `flood.retry.count`, path/type attempt caps, disabled forwarding,
|
||||
`flood.retry.advert`, a drop verdict, or any other forwarding rejection.
|
||||
`flood.retry.bridge` independently chooses ordinary retry or bridge-bucket
|
||||
completion for an allowed packet. The selector applies to received floods;
|
||||
locally originated floods retain the normal global behavior.
|
||||
|
||||
The exact requested examples are:
|
||||
|
||||
@@ -404,6 +427,15 @@ set flood.rule.4 type=any prefix=860C rate=10/min
|
||||
# rules. Hard gates and separate tables still apply.
|
||||
set flood.rule.5 type=grp_data hops=0-2 channel=#rgdata priority=200 stop
|
||||
|
||||
# Retry received Public and #hamradio floods, using bridge completion.
|
||||
# Once these rows exist, other received floods are not retried.
|
||||
set flood.retry.bridge on
|
||||
set flood.rule.6 type=any channel=public retry
|
||||
set flood.rule.7 type=any channel=#hamradio retry
|
||||
|
||||
# Fall back to an unauthenticated one-byte match if only the visible hash is known.
|
||||
set flood.rule.8 type=any channel=hash:A7 retry
|
||||
|
||||
get flood.rule.2
|
||||
get flood.rule.3
|
||||
get flood.rule.4
|
||||
@@ -467,8 +499,9 @@ 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.
|
||||
is `rate=N/min`, and `f=str` combines slow timing (`s`), temporary-radio
|
||||
suspension (`t`), and retry allowance (`r`). 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
|
||||
|
||||
@@ -85,7 +85,7 @@ set flood.retry.ignore none
|
||||
| `flood.channel.scope` | FPF7 rewrite-phase rows that add a transport scope to received unscoped floods or replace 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. Generalized builds commit these rows with the forward phase and blacklist; compact FPF6 builds retain separate storage. 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 flood-route rules selected by payload type and optional hop range. Generalized repeaters have 63 FPF7 forward slots; FULL ESP32 room servers have 31. Repeaters store their scope-rewrite phase, shared unordered blacklist, and channel-data compatibility state in the same atomic FPF7 image. `path=blacklist` is intended for forwarding abuse containment, including bulk internet-to-mesh dumping, but truncated path IDs are not authenticated identities. Fixed 240 KB STM32WL repeaters retain compact FPF6 filtering and separate blacklist storage. 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, optional channel authentication, 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. `channel=*` means no channel condition and `type=any channel=*` matches every flood payload type. `scope=BlackHole86` directly derives a regionless sink scope; `region=BlackHole86` would require a configured flood-allowed region. 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 makes its `region=` rewrite and paired `stop` inert until the name returns, allowing lower safety rows to run. 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.rule` | Live alias for extended `flood.filter` on rule-engine repeaters and FULL ESP32 room servers. A row can AND packet type, hop range, optional channel match, 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, allow flood retry, and/or stop lower-priority FPF7 rules. `channel=*` means no channel condition; `public`, `#name`, and keys authenticate; `hash:XX` is an unauthenticated one-byte fallback with collision/spoof risk. With no `retry` rows, global retry behavior is unchanged; once any exists, matching `retry` rows allow-list received floods while the global retry gates and `flood.retry.bridge` algorithm still apply. `scope=BlackHole86` directly derives a regionless sink scope; `region=BlackHole86` would require a configured flood-allowed region. 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 makes its `region=` rewrite and paired `stop` inert until the name returns, allowing lower safety rows to run. 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|retry|stop> [priority=0-255]`, `del flood.rule.<n>|all` | `set flood.rule.2 type=any channel=#hamradio retry` |
|
||||
| `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 all repeater, sensor, and room-server 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 infrastructure nodes can collect clock evidence when all packets arrive through one relay path. Verified evidence is observed before the forwarding decision, so disabled forwarding 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` |
|
||||
@@ -292,6 +292,16 @@ the bucket rules below instead.
|
||||
| `flood.retry.bucket.<n>` | Shows one bridge bucket. Buckets are numbered `1`-`6`. | `get flood.retry.bucket.<n>` | `get flood.retry.bucket.1` |
|
||||
| `flood.retry.bucket` | Sets bridge bucket prefixes. | `set flood.retry.bucket <1-6> <prefixes/none/off>` | `set flood.retry.bucket 1 71CE82,C7618C` |
|
||||
|
||||
Extended `flood.rule` rows can select which received floods may use these
|
||||
settings. For example, enable bridge completion only for Public and
|
||||
`#hamradio` with `set flood.rule type=any channel=public retry` and a second
|
||||
row using `channel=#hamradio`. Adding the first active `retry` row changes
|
||||
received retry selection into an allow-list; deleting the last restores the
|
||||
legacy global selection. `channel=hash:XX` is available when only the visible
|
||||
one-byte hash is known, but it is not authenticated and is collision-prone.
|
||||
For example, `hash:11` includes Public and any other packet using `0x11`;
|
||||
`channel=public` alone performs the Public-key MAC/decrypt check.
|
||||
|
||||
Bridge buckets may also be reused as passive `flood.channel.scope`
|
||||
path selectors with `path=bucket:<1-6>`. This does not require
|
||||
`flood.retry.bridge` to be enabled and does not depend on recent-repeater
|
||||
|
||||
Reference in new issue
Block a user