forked from premiere/premiere-libtorrent
back-port ajax16384's fix to enum_net_interfaces on windows
This commit is contained in:
parent
61f9f6bb7f
commit
964542e53b
|
@ -630,6 +630,13 @@ namespace libtorrent
|
|||
IP_ADAPTER_UNICAST_ADDRESS* unicast = adapter->FirstUnicastAddress;
|
||||
while (unicast)
|
||||
{
|
||||
if (unicast->Address.lpSockaddr->sa_family != AF_INET
|
||||
#if TORRENT_USE_IPV6
|
||||
&& unicast->Address.lpSockaddr->sa_family != AF_INET6
|
||||
#endif
|
||||
)
|
||||
continue;
|
||||
|
||||
r.interface_address = sockaddr_to_address(unicast->Address.lpSockaddr);
|
||||
|
||||
ret.push_back(r);
|
||||
|
|
Loading…
Reference in New Issue