joyent / libuv

Go to
https://github.com/libuv/libuv
3.27k stars 653 forks source link

Windows. uv_interface_addresses does not fill all structures #1517

Closed moteus closed 10 years ago

moteus commented 10 years ago

When we calculate number of intrefaces we have loop

    for (unicast_address = (IP_ADAPTER_UNICAST_ADDRESS_XP*)
                           win_address->FirstUnicastAddress;
         unicast_address != NULL;
         unicast_address = unicast_address->Next)

But when we fill results we have

    for (unicast_address = (IP_ADAPTER_UNICAST_ADDRESS_XP*)
                           win_address->FirstUnicastAddress;
         unicast_address != NULL && prefix != NULL;
         unicast_address = unicast_address->Next, prefix = prefix->Next) 

On my WinXP SP3 for MS TCP Loopback interface win_address->FirstPrefix is NULL. So we count Loopback interface but does not fill it.

saghul commented 10 years ago

I believe https://github.com/joyent/libuv/pull/1482 addresses this. Hopefully I can review it next monday.

orangemocha commented 10 years ago

Yes, this is fixed by https://github.com/joyent/libuv/pull/1482

saghul commented 10 years ago

Thanks for confirming, @orangemocha, closing this one then!