mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[IPHLPAPI] Check the family parameter in the statistics functions
This commit is contained in:
parent
cdcd954734
commit
da4e15f93a
1 changed files with 13 additions and 1 deletions
|
@ -179,7 +179,7 @@ NTSTATUS tdiGetIpAddrsForIpEntity
|
|||
INFO_TYPE_PROVIDER,
|
||||
IP_MIB_ADDRTABLE_ENTRY_ID,
|
||||
CL_NL_ENTITY,
|
||||
ent->tei_instance,
|
||||
ent->tei_instance,
|
||||
0,
|
||||
sizeof(IPAddrEntry),
|
||||
(PVOID *)addrs,
|
||||
|
@ -334,6 +334,10 @@ DWORD getIPStats(PMIB_IPSTATS stats, DWORD family)
|
|||
{
|
||||
if (!stats)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
if (family != AF_INET && family != AF_INET6)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
|
@ -341,6 +345,10 @@ DWORD getTCPStats(MIB_TCPSTATS *stats, DWORD family)
|
|||
{
|
||||
if (!stats)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
if (family != AF_INET && family != AF_INET6)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
|
@ -348,6 +356,10 @@ DWORD getUDPStats(MIB_UDPSTATS *stats, DWORD family)
|
|||
{
|
||||
if (!stats)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
if (family != AF_INET && family != AF_INET6)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue