this code needs to detect the first non-existing interface by name, not the first existing one. this remidies this. sorry testnet for breaking you

pull/1965/head
Jeff 2 years ago
parent 83f648fd87
commit 3a97acfb51
No known key found for this signature in database
GPG Key ID: 025C02EE3A092F2D

@ -409,7 +409,7 @@ namespace llarp::net
while (num < 255)
{
std::string ifname = fmt::format("lokitun{}", num);
if (GetInterfaceAddr(ifname, AF_INET))
if (GetInterfaceAddr(ifname, AF_INET) == std::nullopt)
return ifname;
num++;
}

Loading…
Cancel
Save