Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #8726 from xperia64/dns_improvements
Respect Core::WantsDeterminism for DNS servers on Linux
  • Loading branch information
leoetlino committed Apr 27, 2020
2 parents 9d44af4 + b4e49dc commit 71f409d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Source/Core/Core/IOS/Network/IP/Top.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 71f409d

Please sign in to comment.