Persist unchanged Companion channel route SETs before OK
Require a real raw-table save for same-value channel SETs. This repairs the false acknowledgement after successful constructor recovery of an older backup followed by a failed candidate write. Keep resolved alias keys, raw AUTO policy and runtime generation untouched. Preserve GET and unchanged contact behavior, changed-policy validation and indeterminate-publication quarantine. Cover real stale-backup creation, failure/retry, reboot and exact old-skip controls. Add actual alias/BaseChatMesh and raw app-key regression tests on all four backends. Verified 117 related host tests, 16 final caller rechecks, four firmware qualifications and linked nRF52 crypto checks.
This commit is contained in:
1 parent
24b1264a0e
commit
4b81a9d5e0
6 files changed
+340
-16
No files matched your search
@@ -3744,13 +3744,17 @@ bool MyMesh::handleTxRoutingCommand(const char* command, char* reply, size_t rep
|
||||
return true;
|
||||
}
|
||||
uint8_t policy = parsed.channel ? channel.channel.tx_radio : contact->tx_radio;
|
||||
if (parsed.set && policy != parsed.policy) {
|
||||
bool saved;
|
||||
if (parsed.channel) {
|
||||
if (parsed.set) {
|
||||
bool saved = true;
|
||||
if (policy == parsed.policy) {
|
||||
// A prior recovery may have restored older disk data. Save the raw
|
||||
// table without mutating a resolved alias or its runtime generation.
|
||||
if (parsed.channel) saved = saveChannels();
|
||||
} else if (parsed.channel) {
|
||||
const auto alias = parseCompanionChannelAlias(channel.name);
|
||||
if (isAliasRadio2Defined()
|
||||
&& (alias.kind == CompanionChannelKind::Radio2 || alias.kind == CompanionChannelKind::Meshtext)) {
|
||||
snprintf(reply, reply_size, "Error: channel prefix controls routing; rename it to change routing");
|
||||
snprintf(reply, reply_size, "Error: prefix controls routing; rename channel");
|
||||
return true;
|
||||
}
|
||||
// Persist the app PSK, not the resolved wire-key copy used for reporting.
|
||||
|
||||
Reference in new issue
Block a user