diff options
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/IResolver.cs')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/IResolver.cs | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/IResolver.cs b/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/IResolver.cs index 80339b4a..13c5597f 100644 --- a/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/IResolver.cs +++ b/Ryujinx.HLE/HOS/Services/Sockets/Sfdnsres/IResolver.cs @@ -18,7 +18,10 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres [Service("sfdnsres")] class IResolver : IpcService { - public IResolver(ServiceCtx context) { } + public IResolver(ServiceCtx context) + { + DnsMitmResolver.Instance.ReloadEntries(context); + } [CommandHipc(0)] // SetDnsAddressesPrivateRequest(u32, buffer<unknown, 5, 0>) @@ -259,6 +262,16 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres return ResultCode.Success; } + // Atmosphère extension for dns_mitm + [CommandHipc(65000)] + // AtmosphereReloadHostsFile() + public ResultCode AtmosphereReloadHostsFile(ServiceCtx context) + { + DnsMitmResolver.Instance.ReloadEntries(context); + + return ResultCode.Success; + } + private static ResultCode GetHostByNameRequestImpl( ServiceCtx context, ulong inputBufferPosition, @@ -321,7 +334,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres try { - hostEntry = Dns.GetHostEntry(targetHost); + hostEntry = DnsMitmResolver.Instance.ResolveAddress(targetHost); } catch (SocketException exception) { @@ -537,7 +550,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Sfdnsres try { - hostEntry = Dns.GetHostEntry(targetHost); + hostEntry = DnsMitmResolver.Instance.ResolveAddress(targetHost); } catch (SocketException exception) { |
