From ddd4a45bc3a9d8e227f532d1a04a5508ecf54e31 Mon Sep 17 00:00:00 2001 From: GUVWAF <78759985+GUVWAF@users.noreply.github.com> Date: Wed, 9 Oct 2024 05:59:00 +0200 Subject: [PATCH] Ignore packets coming from the broadcast address (#4998) --- src/mesh/Router.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/mesh/Router.cpp b/src/mesh/Router.cpp index b5732dee9..195572163 100644 --- a/src/mesh/Router.cpp +++ b/src/mesh/Router.cpp @@ -636,19 +636,25 @@ void Router::perhapsHandleReceived(meshtastic_MeshPacket *p) #endif // assert(radioConfig.has_preferences); if (is_in_repeated(config.lora.ignore_incoming, p->from)) { - LOG_DEBUG("Ignoring incoming message, 0x%x is in our ignore list\n", p->from); + LOG_DEBUG("Ignoring msg, 0x%x is in our ignore list\n", p->from); + packetPool.release(p); + return; + } + + if (p->from == NODENUM_BROADCAST) { + LOG_DEBUG("Ignoring msg from broadcast address\n"); packetPool.release(p); return; } if (config.lora.ignore_mqtt && p->via_mqtt) { - LOG_DEBUG("Message came in via MQTT from 0x%x\n", p->from); + LOG_DEBUG("Msg came in via MQTT from 0x%x\n", p->from); packetPool.release(p); return; } if (shouldFilterReceived(p)) { - LOG_DEBUG("Incoming message was filtered from 0x%x\n", p->from); + LOG_DEBUG("Incoming msg was filtered from 0x%x\n", p->from); packetPool.release(p); return; }