Fix interface enumeration on posix

The last interface wouldn't be considered.
pull/2008/head
Jason Rhinelander 2 years ago
parent fe0f916a09
commit e398b5bff8
No known key found for this signature in database
GPG Key ID: C4992CE7A88D4262

@ -32,7 +32,7 @@ namespace llarp::net
if (getifaddrs(&addrs))
throw std::runtime_error{fmt::format("getifaddrs(): {}", strerror(errno))};
for (auto next = addrs; next and next->ifa_next; next = next->ifa_next)
for (auto next = addrs; next; next = next->ifa_next)
visit(next);
freeifaddrs(addrs);

Loading…
Cancel
Save