Skip to content
Permalink
Browse files
Merge pull request #9100 from sepalani/gethostid-log
IP/Top: Log IOCTL_SO_GETHOSTID properly
  • Loading branch information
lioncash committed Oct 19, 2020
2 parents 49c7a5b + 8488eb9 commit abfae46
Showing 1 changed file with 4 additions and 2 deletions.
@@ -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 = %u.%u.%u.%u", host_ip >> 24, (host_ip >> 16) & 0xFF,
(host_ip >> 8) & 0xFF, host_ip & 0xFF);
return GetDefaultReply(host_ip);
}

IPCCommandResult NetIPTop::HandleInetAToNRequest(const IOCtlRequest& request)

0 comments on commit abfae46

Please sign in to comment.