Commit Graph
18 Commits
Author SHA1 Message Date
jirogit 8ef369058d fix(RegionMap): distinguish clean EOF from partial read in load()
Previously load() returned true unconditionally on file-open success,
masking truncated or corrupt /regions2 files. Additionally, the first
field of each entry record (r->id) used the same success-chaining
pattern as subsequent fields, so a clean EOF at a record boundary set
success=false and would have been indistinguishable from real
corruption once the return value was fixed.

The r->id read is now split out: n==0 is a clean EOF (break, success
retains its prior value from the header read), n!=sizeof(r->id) is a
partial read or corruption (break, success=false). load() now returns
success instead of an unconditional true, so its return value reflects
the actual parse outcome.

Companion fix to #2372, which fixed the same return-true hardcoding
in save(). (#1891 originally reported this on load() but was closed
when #2372 landed — that PR only touched save(); this addresses the
load() side.)
2026-07-09 19:59:05 -07:00
jirogit 8e787f6ee4 fix(RegionMap): save() returns actual write success instead of hardcoded true 2026-05-01 00:06:46 -07:00
Scott Powell 49b37d5622 * minor bounds fix 2026-04-18 21:32:41 +10:00
Scott Powell 576e9dfd45 * bug fix 2026-04-15 15:44:22 +10:00
Scott Powell d131e8ae35 * companion: RegionMap now used in Datastore
* companion: new CMD_SET_DEFAULT_FLOOD_SCOPE
* support for regional builds with DEFAULT_REGION_SCOPE
2026-04-13 21:06:53 +10:00
Scott Powell 6a939ed8f8 * RegionMap: new 'default' region 2026-04-12 22:06:10 +10:00
Scott Powell 5ff6e813bd * Fix: RegionMap build fail on _max 2026-01-27 18:16:21 +11:00
Matthias Wientapper 0805a47f35 Add output of region cmd via lora cli
Add cli commands "region list {allowed|denied}"
2026-01-26 17:44:43 +01:00
Scott Powell 7ae164217c * region names now don't need '#' prefix. (SHA still adds a '#' for back compat) 2026-01-25 18:35:55 +11:00
Scott Powell b6110eee38 * new req/resp (after login): REQ_TYPE_GET_OWNER_INFO (includes firmware-ver)
* ANON_REQ_TYPE_OWNER, firmware-ver removed (security exploit)
* ANON_REQ_TYPE_BASIC, formware-ver removed, just remote clock + some 'feature' bits
* CTL_TYPE_NODE_DISCOVER_REQ now ingored if 'repeat off' has been set
2026-01-12 16:58:35 +11:00
Scott Powell 3af25495bb * Repeater: new anon request sub-type: ANON_REQ_TYPE_REGIONS (rate limited to max 4 every 3 mins)
* Companion: new CMD_SEND_ANON_REQ command (reply with existing RESP_CODE_SENT frame)
2026-01-03 12:02:15 +11:00
Scott Powell 963290ea15 * repeater: various "region" CLI changes
* transport codes 0000 and FFFF reserved
2025-11-07 14:42:06 +11:00
Scott Powell ddac13ae80 * repeater: CLI, added "region put" and "region remove" commands 2025-11-06 21:40:52 +11:00
Scott Powell cf547da857 * RegionMap: get/set Home Region
* repeater: admin CLI, changed "allowf *", "denyf *", added "home"
2025-11-06 17:28:45 +11:00
Scott Powell 9ebeb477aa * RegionMap: inverted 'flags' to _deny_ bits
* Mesh: new filterRecvFloodPacket() for overriding
* repeater CLI: 'allow' -> 'allowf' or 'denyf'
2025-11-05 14:34:44 +11:00
Scott Powell ecd30f4d36 * new CLI commands: region, region load, region save, region get, region allow 2025-11-03 22:53:14 +11:00
Scott Powell f797744f7c * misc RegionMap and key store methods 2025-11-03 18:14:44 +11:00
Scott Powell 03fc949014 * setting up framework for Regions, TransportKeys, etc 2025-11-03 14:23:32 +11:00