* repeater: various "region" CLI changes

* transport codes 0000 and FFFF reserved
This commit is contained in:
Scott Powell committed 2025-11-07 14:42:06 +11:00
1 parent 96ed2a69f8
commit 1d12bc116d
5 files changed
+28 -6

No files matched your search

+5
View File
@@ -9,6 +9,11 @@ uint16_t TransportKey::calcTransportCode(const mesh::Packet* packet) const {
sha.update(&type, 1);
sha.update(packet->payload, packet->payload_len);
sha.finalizeHMAC(key, sizeof(key), &code, 2);
if (code == 0) { // reserve codes 0000 and FFFF
code++;
} else if (code == 0xFFFF) {
code--;
}
return code;
}