From b4e49dc65697c99108ac61a7853a5f88732f41cc Mon Sep 17 00:00:00 2001 From: xperia64 Date: Mon, 6 Apr 2020 15:45:43 -0400 Subject: [PATCH] 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. --- Source/Core/Core/IOS/Network/IP/Top.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/IOS/Network/IP/Top.cpp b/Source/Core/Core/IOS/Network/IP/Top.cpp index 4aff46e48d..53adfce757 100644 --- a/Source/Core/Core/IOS/Network/IP/Top.cpp +++ b/Source/Core/Core/IOS/Network/IP/Top.cpp @@ -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;