summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/sockets/sfdnsres.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-08-29 15:27:32 +0200
committerGitHub <noreply@github.com>2023-08-29 15:27:32 +0200
commit1f04a3dd5520694e9160038a129c9154de79eeb0 (patch)
tree2f8f69375f93e5cb429adad8b3e5ec2012085f8d /src/core/hle/service/sockets/sfdnsres.cpp
parentMerge pull request #11112 from danilaml/nvdec-deinterlace (diff)
parentsfdnsres: ensure lp1 is not resolved (diff)
downloadyuzu-1f04a3dd5520694e9160038a129c9154de79eeb0.tar
yuzu-1f04a3dd5520694e9160038a129c9154de79eeb0.tar.gz
yuzu-1f04a3dd5520694e9160038a129c9154de79eeb0.tar.bz2
yuzu-1f04a3dd5520694e9160038a129c9154de79eeb0.tar.lz
yuzu-1f04a3dd5520694e9160038a129c9154de79eeb0.tar.xz
yuzu-1f04a3dd5520694e9160038a129c9154de79eeb0.tar.zst
yuzu-1f04a3dd5520694e9160038a129c9154de79eeb0.zip
Diffstat (limited to 'src/core/hle/service/sockets/sfdnsres.cpp')
-rw-r--r--src/core/hle/service/sockets/sfdnsres.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/hle/service/sockets/sfdnsres.cpp b/src/core/hle/service/sockets/sfdnsres.cpp
index 22e4a6f49..c657c4efd 100644
--- a/src/core/hle/service/sockets/sfdnsres.cpp
+++ b/src/core/hle/service/sockets/sfdnsres.cpp
@@ -150,6 +150,12 @@ static std::pair<u32, GetAddrInfoError> GetHostByNameRequestImpl(HLERequestConte
const std::string host = Common::StringFromBuffer(host_buffer);
// For now, ignore options, which are in input buffer 1 for GetHostByNameRequestWithOptions.
+ // Prevent resolution of Nintendo servers
+ if (host.find("srv.nintendo.net") != std::string::npos) {
+ LOG_WARNING(Network, "Resolution of hostname {} requested, returning EAI_AGAIN", host);
+ return {0, GetAddrInfoError::AGAIN};
+ }
+
auto res = Network::GetAddressInfo(host, /*service*/ std::nullopt);
if (!res.has_value()) {
return {0, Translate(res.error())};
@@ -261,6 +267,12 @@ static std::pair<u32, GetAddrInfoError> GetAddrInfoRequestImpl(HLERequestContext
const auto host_buffer = ctx.ReadBuffer(0);
const std::string host = Common::StringFromBuffer(host_buffer);
+ // Prevent resolution of Nintendo servers
+ if (host.find("srv.nintendo.net") != std::string::npos) {
+ LOG_WARNING(Network, "Resolution of hostname {} requested, returning EAI_AGAIN", host);
+ return {0, GetAddrInfoError::AGAIN};
+ }
+
std::optional<std::string> service = std::nullopt;
if (ctx.CanReadBuffer(1)) {
const std::span<const u8> service_buffer = ctx.ReadBuffer(1);