From 893efe4f11b4549e2e5d38a69990740b28787054 Mon Sep 17 00:00:00 2001 From: GUVWAF <78759985+GUVWAF@users.noreply.github.com> Date: Sat, 9 Nov 2024 04:30:12 +0100 Subject: [PATCH] Always set the channel corresponding to a node (#5287) --- src/mesh/Router.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mesh/Router.cpp b/src/mesh/Router.cpp index ca9600cabc..0b46ca3b9e 100644 --- a/src/mesh/Router.cpp +++ b/src/mesh/Router.cpp @@ -187,9 +187,10 @@ ErrorCode Router::sendLocal(meshtastic_MeshPacket *p, RxSource src) handleReceived(p, src); } - if (!p->channel && !p->pki_encrypted) { // don't override if a channel was requested + // don't override if a channel was requested and no need to set it when PKI is enforced + if (!p->channel && !p->pki_encrypted) { meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(p->to); - if (node && node->user.public_key.size == 0) { + if (node) { p->channel = node->channel; LOG_DEBUG("localSend to channel %d", p->channel); }