Merge pull request #9100 from sepalani/gethostid-log

IP/Top: Log IOCTL_SO_GETHOSTID properly
This commit is contained in:
LC 2020-10-19 07:58:15 -04:00 committed by GitHub
commit abfae46a2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -542,9 +542,11 @@ IPCCommandResult NetIPTop::HandleGetPeerNameRequest(const IOCtlRequest& request)
IPCCommandResult NetIPTop::HandleGetHostIDRequest(const IOCtlRequest& request) IPCCommandResult NetIPTop::HandleGetHostIDRequest(const IOCtlRequest& request)
{ {
request.Log(GetDeviceName(), Common::Log::IOS_WC24);
const DefaultInterface interface = GetSystemDefaultInterfaceOrFallback(); 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) IPCCommandResult NetIPTop::HandleInetAToNRequest(const IOCtlRequest& request)