Skip to content

Commit f97f85d

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

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/mqtt/MQTT.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,14 @@ 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+
}
171+
if (p->decoded.portnum == meshtastic_PortNum_ADMIN_APP) {
172+
LOG_INFO("Ignoring decoded admin packet.\n");
173+
packetPool.release(p);
174+
}
167175
p->channel = ch.index;
168176
}
169177

0 commit comments

Comments
 (0)