Author: spetreolle Date: Sun Mar 22 20:35:21 2015 New Revision: 66859
URL: http://svn.reactos.org/svn/reactos?rev=66859&view=rev Log: [IPHLPAPI] Add checks for the family.
Modified: trunk/reactos/dll/win32/iphlpapi/address.c
Modified: trunk/reactos/dll/win32/iphlpapi/address.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/iphlpapi/address.... ============================================================================== --- trunk/reactos/dll/win32/iphlpapi/address.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/iphlpapi/address.c [iso-8859-1] Sun Mar 22 20:35:21 2015 @@ -290,15 +290,24 @@ if (!pOutBufLen) return ERROR_INVALID_PARAMETER;
- if ((Family == AF_INET6) || (Family == AF_UNSPEC)) - { - /* One day maybe... */ - FIXME("IPv6 is not supported in ReactOS!\n"); - if (Family == AF_INET6) - { + switch(Family) + { + case AF_INET: + break; + case AF_INET6: + /* One day maybe... */ + FIXME("IPv6 is not supported in ReactOS!\n"); /* We got nothing to say in this case */ return ERROR_NO_DATA; - } + break; + case AF_UNSPEC: + WARN("IPv6 addresses ignored, IPv4 only\n"); + Family = AF_INET; + break; + default: + ERR("Invalid family 0x%x\n", Family); + return ERROR_INVALID_PARAMETER; + break; }
RemainingSize = *pOutBufLen;