1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-02-10 13:40:32 +00:00

Fixed duplicate MAC detection so that it skips 00:00:00:00:00:00, which is commonly used for loopback interfaces

This commit is contained in:
Bryan Roe
2019-01-17 15:42:58 -08:00
parent 12f8dc4509
commit 9ea6ecccdb

View File

@@ -3184,7 +3184,10 @@ int MeshAgent_AgentMode(MeshAgentHostContainer *agentHost, int paramLen, char **
int i = 0;
while (i < len)
{
if (ILibString_IndexOf(mac, (int)macLen, curr + i, 19) >= 0) { break; }
if (strncmp(curr + i, "[00:00:00:00:00:00]", 19) != 0)
{
if (ILibString_IndexOf(mac, (int)macLen, curr + i, 19) >= 0) { break; }
}
i += 19;
}
if (i >= len) { resetNodeId = 1; ILibSimpleDataStore_PutEx(agentHost->masterDb, "LocalMacAddresses", 17, mac, (int)macLen); }