Distinguish LAN nonce failures from ordinary unknown devices
This commit is contained in:
1 parent
94a76e569e
commit
8dd28fb90a
3 files changed
+18
-9
No files matched your search
@@ -121,7 +121,7 @@ static int route_verify(void* arg, uint64_t peer, const uint8_t* data, size_t le
|
||||
struct TOPO_NODE* node = topo_node_registry_find(inst->topo_groups, peer);
|
||||
if (node && node->timestamp) memcpy(key, node->ed25519_public_key, sizeof(key));
|
||||
else if (!inst->topo_sqlite_db || topo_node_sqlite_get_ed25519_pubkey(inst->topo_sqlite_db, peer, key)) {
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_DISCOVERY, "LAN route ignored peer=%016llx reason=unknown signing key", (unsigned long long)peer); return -1;
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_DISCOVERY, "LAN route ignored peer=%016llx reason=unknown signing key", (unsigned long long)peer); return 1;
|
||||
}
|
||||
if (sc_ed25519_verify(key, data, len, signature) != SC_OK) {
|
||||
DEBUG_WARN(DEBUG_CATEGORY_DISCOVERY, "LAN route signature rejected peer=%016llx", (unsigned long long)peer); return -1;
|
||||
|
||||
Reference in new issue
Block a user