Send UDP packet even if it's encrypted (#6524)

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
GUVWAF
2025-04-09 13:13:49 +02:00
committed by GitHub
parent ec298199ee
commit 69f938ea98

View File

@@ -283,11 +283,6 @@ ErrorCode Router::send(meshtastic_MeshPacket *p)
abortSendAndNak(encodeResult, p);
return encodeResult; // FIXME - this isn't a valid ErrorCode
}
#if HAS_UDP_MULTICAST
if (udpThread && config.network.enabled_protocols & meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST) {
udpThread->onSend(const_cast<meshtastic_MeshPacket *>(p));
}
#endif
#if !MESHTASTIC_EXCLUDE_MQTT
// Only publish to MQTT if we're the original transmitter of the packet
if (moduleConfig.mqtt.enabled && isFromUs(p) && mqtt) {
@@ -297,6 +292,12 @@ ErrorCode Router::send(meshtastic_MeshPacket *p)
packetPool.release(p_decoded);
}
#if HAS_UDP_MULTICAST
if (udpThread && config.network.enabled_protocols & meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST) {
udpThread->onSend(const_cast<meshtastic_MeshPacket *>(p));
}
#endif
assert(iface); // This should have been detected already in sendLocal (or we just received a packet from outside)
return iface->send(p);
}