udp-multicast: do not listen for incoming udp multicast packets if disabled (#6397)

Currently the config flag only control if packets are sent, not received.

As we discussed in VC this is not what was intended.
This commit is contained in:
Jorropo
2025-03-26 08:10:56 +01:00
committed by GitHub
parent 13101c1bab
commit 6429eca5e4
2 changed files with 4 additions and 2 deletions

View File

@@ -829,7 +829,9 @@ void setup()
#ifdef ARCH_PORTDUINO
// FIXME: portduino does not ever call onNetworkConnected so call it here because I don't know what happen if I call
// onNetworkConnected there
udpThread->start();
if (config.network.enabled_protocols & meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST) {
udpThread->start();
}
#endif
#endif
service = new MeshService();