Skip to content

Commit 85d7222

Browse files
committed
Additional decoded packet ignores
1 parent 921d92c commit 85d7222

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/mqtt/MQTT.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,16 @@ void MQTT::onReceive(char *topic, byte *payload, size_t length)
164164
return;
165165
}
166166
if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {
167+
if (moduleConfig.mqtt.encryption_enabled) {
168+
LOG_INFO("Ignoring decoded message on MQTT, encryption is enabled.\n");
169+
packetPool.release(p);
170+
return;
171+
}
172+
if (p->decoded.portnum == meshtastic_PortNum_ADMIN_APP) {
173+
LOG_INFO("Ignoring decoded admin packet.\n");
174+
packetPool.release(p);
175+
return;
176+
}
167177
p->channel = ch.index;
168178
}
169179

0 commit comments

Comments
 (0)