Commit e192beeb authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

iphlpapi: Set adapter description in GetAdaptersAddresses.

parent 4ec277d8
......@@ -768,7 +768,7 @@ static ULONG adapterAddressesFromIndex(ULONG family, DWORD index, IP_ADAPTER_ADD
total_size = sizeof(IP_ADAPTER_ADDRESSES);
total_size += IF_NAMESIZE;
total_size += IF_NAMESIZE * sizeof(WCHAR);
total_size += 2 * IF_NAMESIZE * sizeof(WCHAR);
total_size += sizeof(IP_ADAPTER_UNICAST_ADDRESS) * num_v4addrs;
total_size += sizeof(struct sockaddr_in) * num_v4addrs;
total_size += (sizeof(IP_ADAPTER_GATEWAY_ADDRESS) + sizeof(SOCKADDR_IN)) * num_v4_gateways;
......@@ -796,6 +796,11 @@ static ULONG adapterAddressesFromIndex(ULONG family, DWORD index, IP_ADAPTER_ADD
*dst = *src;
*dst++ = 0;
ptr = (char *)dst;
aa->Description = (WCHAR *)ptr;
for (src = name, dst = (WCHAR *)ptr; *src; src++, dst++)
*dst = *src;
*dst++ = 0;
ptr = (char *)dst;
TRACE("%s: %d IPv4 addresses, %d IPv6 addresses:\n", name, num_v4addrs,
num_v6addrs);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment