Respect Core::WantsDeterminism for DNS on Linux

Previously Core::WantsDeterminism was only checked for setting the DNS on WIN32.
Same check should apply to Linux too.
This commit is contained in:
xperia64 2020-04-06 15:45:43 -04:00 committed by GitHub
parent 4ff855921e
commit b4e49dc656
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -860,10 +860,13 @@ IPCCommandResult NetIPTop::HandleGetInterfaceOptRequest(const IOCtlVRequest& req
}
}
#elif defined(__linux__) && !defined(__ANDROID__)
if (res_init() == 0)
address = ntohl(_res.nsaddr_list[0].sin_addr.s_addr);
else
WARN_LOG(IOS_NET, "Call to res_init failed");
if (!Core::WantsDeterminism())
{
if (res_init() == 0)
address = ntohl(_res.nsaddr_list[0].sin_addr.s_addr);
else
WARN_LOG(IOS_NET, "Call to res_init failed");
}
#endif
if (address == 0)
address = default_main_dns_resolver;