* repeater: various "region" CLI changes

* transport codes 0000 and FFFF reserved
This commit is contained in:
Scott Powell
2025-11-07 14:42:06 +11:00
parent 2e63499ae5
commit 963290ea15
5 changed files with 28 additions and 6 deletions

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;
}