DSR wip still kinda busted (rx packets not working - even for regular router)

This commit is contained in:
geeksville
2020-05-24 12:58:36 -07:00
parent 5bd3e4bcd0
commit 8f1b26bdda
3 changed files with 9 additions and 6 deletions

View File

@@ -201,14 +201,16 @@ void Router::handleReceived(MeshPacket *p)
void Router::perhapsHandleReceived(MeshPacket *p)
{
assert(radioConfig.has_preferences);
bool inIgnore = is_in_repeated(radioConfig.preferences.ignore_incoming, p->from);
bool ignore = is_in_repeated(radioConfig.preferences.ignore_incoming, p->from);
if (inIgnore)
if (ignore)
DEBUG_MSG("Ignoring incoming message, 0x%x is in our ignore list\n", p->from);
else if (ignore |= shouldFilterReceived(p))
DEBUG_MSG("Incoming message was filtered 0x%x\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))
if (!ignore)
handleReceived(p);
packetPool.release(p);