Fix MAC-based machine entropy generation

This commit is contained in:
Louvenarde 2024-02-11 15:42:51 +01:00
parent c067b099f1
commit e4a5cd056e

View File

@ -566,23 +566,21 @@ namespace Components
{ {
switch (pIpAdapterInfo->Type) switch (pIpAdapterInfo->Type)
{ {
default: case IF_TYPE_IEEE80211:
pIpAdapterInfo = pIpAdapterInfo->Next; case MIB_IF_TYPE_ETHERNET:
continue;
case IF_TYPE_IEEE80211:
case MIB_IF_TYPE_ETHERNET:
{
std::string macAddress{};
for (size_t i = 0; i < ARRAYSIZE(pIpAdapterInfo->Address); i++)
{ {
entropy += std::to_string(pIpAdapterInfo->Address[i]);
}
break; std::string macAddress{};
} for (size_t i = 0; i < ARRAYSIZE(pIpAdapterInfo->Address); i++)
{
entropy += std::to_string(pIpAdapterInfo->Address[i]);
}
break;
}
} }
pIpAdapterInfo = pIpAdapterInfo->Next;
} }
} }