Add support for ignoring nodes with is_ignored field in NodeInfo (#5319)

* Add support for is_ignored bool in NodeInfo

* is_ignored is not a boring node either

* Clean out metrics and position

* Clear the key too

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
Matthijs De Smedt
2024-11-12 11:27:44 -08:00
committed by GitHub
parent f4b0e19a65
commit 2ec3958cd8
4 changed files with 32 additions and 2 deletions

View File

@@ -659,6 +659,13 @@ void Router::perhapsHandleReceived(meshtastic_MeshPacket *p)
return;
}
meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(p->from);
if (node != NULL && node->is_ignored) {
LOG_DEBUG("Ignore msg, 0x%x is ignored", p->from);
packetPool.release(p);
return;
}
if (p->from == NODENUM_BROADCAST) {
LOG_DEBUG("Ignore msg from broadcast address");
packetPool.release(p);