meshtastic / firmware

Meshtastic device firmware
https://meshtastic.org
GNU General Public License v3.0
3.31k stars 801 forks source link

[Feature Request]: Don't Save MQTT Nodes to the NodeDB if IgnoreMqtt is on #3438

Closed garthvh closed 5 months ago

garthvh commented 6 months ago

Platform

NRF52, ESP32

Description

Right now my router node is set to ignore MQTT to not annoy my many nearby lora friends, but it still collects MQTT nodes in the nodedb.

tavdog commented 6 months ago

Why have mqtt enabled if you want to ignore everything ? I guess I see the logic if you just doing uplink for location purposes. As far as I can tell any incoming packets with a valid via_mqtt flag are already ignored : DEBUG | 12:05:03 114 [Router] Ignoring incoming message, 0xabcdaaaa is in our ignore list or came via MQTT However, if the packet gets repeated by any old firmware device then game over as it won't have the via_mqtt flag set and it'll pop back up in the nodedb.

garthvh commented 6 months ago

My router has 100 MQTT nodes in the nodedb, mqtt is not on on that node, just ignore mqtt.

garthvh commented 6 months ago

Seems to be honoring the ignore mqtt for rebroadcasting, but not the node infos

tavdog commented 6 months ago

the from_mqtt flag must not be getting set somewhere in the network. In my test I just had client bridge on and tested by sending packets and nodinfo via python client. It ignored all packets including nodeinfos. But when I had other nodes possibly repeating nodeinfos they did make it in and I could see that the from_mqtt flag wasn't set.

zapewne commented 3 months ago

From my observations, if you disable MQTT then your node will not appear on the map.