mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
[IPHLPAPI]
Properly return unicast addresses in GetAdaptersAddresses() by properly return a struct sockaddr_in. This fixes a bunch of failing tests in iphlpapi_apitest, and it should fix any application relying on this API to know interfaces addresses. svn path=/trunk/; revision=70292
This commit is contained in:
parent
b2a6aff94f
commit
b8b86d432b
1 changed files with 3 additions and 2 deletions
|
@ -588,9 +588,10 @@ GetAdaptersAddresses(
|
||||||
/* Set the address */
|
/* Set the address */
|
||||||
//FIXME: ipv4 only (again...)
|
//FIXME: ipv4 only (again...)
|
||||||
UnicastAddress->Address.lpSockaddr = (LPSOCKADDR)(UnicastAddress + 1);
|
UnicastAddress->Address.lpSockaddr = (LPSOCKADDR)(UnicastAddress + 1);
|
||||||
UnicastAddress->Address.iSockaddrLength = sizeof(AddrEntries[j].iae_addr);
|
UnicastAddress->Address.iSockaddrLength = sizeof(SOCKADDR);
|
||||||
UnicastAddress->Address.lpSockaddr->sa_family = AF_INET;
|
UnicastAddress->Address.lpSockaddr->sa_family = AF_INET;
|
||||||
memcpy(UnicastAddress->Address.lpSockaddr->sa_data, &AddrEntries[j].iae_addr, sizeof(AddrEntries[j].iae_addr));
|
((LPSOCKADDR_IN)UnicastAddress->Address.lpSockaddr)->sin_port = 0;
|
||||||
|
memcpy(&((LPSOCKADDR_IN)UnicastAddress->Address.lpSockaddr)->sin_addr, &AddrEntries[j].iae_addr, sizeof(AddrEntries[j].iae_addr));
|
||||||
|
|
||||||
CurrentAA->FirstUnicastAddress = UnicastAddress;
|
CurrentAA->FirstUnicastAddress = UnicastAddress;
|
||||||
Ptr += Size;
|
Ptr += Size;
|
||||||
|
|
Loading…
Reference in a new issue