mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-18 16:52:27 +00:00
add ignore_incoming to user preferences, for automated testing of DSR topologies
This commit is contained in:
@@ -195,7 +195,15 @@ void Router::handleReceived(MeshPacket *p)
|
||||
|
||||
void Router::perhapsHandleReceived(MeshPacket *p)
|
||||
{
|
||||
if (!shouldFilterReceived(p))
|
||||
assert(radioConfig.has_preferences);
|
||||
bool inIgnore = is_in_repeated(radioConfig.preferences.ignore_incoming, p->from);
|
||||
|
||||
if (inIgnore)
|
||||
DEBUG_MSG("Ignoring incoming message, 0x%x is in our ignore list\n", p->from);
|
||||
|
||||
// Note: we avoid calling shouldFilterReceived if we are supposed to ignore certain nodes - because some overrides might
|
||||
// cache/learn of the existence of nodes (i.e. FloodRouter) that they should not
|
||||
if (!inIgnore && !shouldFilterReceived(p))
|
||||
handleReceived(p);
|
||||
|
||||
packetPool.release(p);
|
||||
|
||||
Reference in New Issue
Block a user