Skip to content

Commit

Permalink
IP/Top: Log IOCTL_SO_GETHOSTID properly
Browse files Browse the repository at this point in the history
  • Loading branch information
sepalani committed Sep 20, 2020
1 parent 39df014 commit 9d0f2bd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/Core/Core/IOS/Network/IP/Top.cpp
Expand Up @@ -542,9 +542,11 @@ IPCCommandResult NetIPTop::HandleGetPeerNameRequest(const IOCtlRequest& request)

IPCCommandResult NetIPTop::HandleGetHostIDRequest(const IOCtlRequest& request)
{
request.Log(GetDeviceName(), Common::Log::IOS_WC24);
const DefaultInterface interface = GetSystemDefaultInterfaceOrFallback();
return GetDefaultReply(Common::swap32(interface.inet));
const u32 host_ip = Common::swap32(interface.inet);
INFO_LOG(IOS_NET, "IOCTL_SO_GETHOSTID = %d.%d.%d.%d", host_ip >> 24, (host_ip >> 16) & 0xFF,
(host_ip >> 8) & 0xFF, host_ip & 0xFF);
return GetDefaultReply(host_ip);
}

IPCCommandResult NetIPTop::HandleInetAToNRequest(const IOCtlRequest& request)
Expand Down

0 comments on commit 9d0f2bd

Please sign in to comment.