mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 17:52:35 +00:00
Send UDP packet even if it's encrypted (#6524)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
@@ -283,11 +283,6 @@ ErrorCode Router::send(meshtastic_MeshPacket *p)
|
|||||||
abortSendAndNak(encodeResult, p);
|
abortSendAndNak(encodeResult, p);
|
||||||
return encodeResult; // FIXME - this isn't a valid ErrorCode
|
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
|
#if !MESHTASTIC_EXCLUDE_MQTT
|
||||||
// Only publish to MQTT if we're the original transmitter of the packet
|
// Only publish to MQTT if we're the original transmitter of the packet
|
||||||
if (moduleConfig.mqtt.enabled && isFromUs(p) && mqtt) {
|
if (moduleConfig.mqtt.enabled && isFromUs(p) && mqtt) {
|
||||||
@@ -297,6 +292,12 @@ ErrorCode Router::send(meshtastic_MeshPacket *p)
|
|||||||
packetPool.release(p_decoded);
|
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)
|
assert(iface); // This should have been detected already in sendLocal (or we just received a packet from outside)
|
||||||
return iface->send(p);
|
return iface->send(p);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user