mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-15 12:13:24 +00:00
bug: if we have only one network interface, then terminate the linked list with nullptr
otherwise, the windows build will crash
This commit is contained in:
parent
2fdc7ae8a8
commit
19b7f47322
@ -263,6 +263,10 @@ _llarp_nt_getadaptersinfo(struct llarp_nt_ifaddrs_t** ifap)
|
||||
ift->_ifa.ifa_next = (struct llarp_nt_ifaddrs_t*)(ift + 1);
|
||||
ift = (struct _llarp_nt_ifaddrs_t*)(ift->_ifa.ifa_next);
|
||||
}
|
||||
else
|
||||
{
|
||||
ift->_ifa.ifa_next = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -868,7 +872,7 @@ namespace llarp
|
||||
if(i->ifa_addr->sa_family == af)
|
||||
{
|
||||
llarp::Addr a(*i->ifa_addr);
|
||||
if(!(a.isPrivate() || a.isLoopback()))
|
||||
if(!(a.isPrivate() || a.isLoopback() || (a.getHostLong() == 0)))
|
||||
{
|
||||
ifname = i->ifa_name;
|
||||
found = true;
|
||||
|
Loading…
Reference in New Issue
Block a user