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

dev
Jeff 2 months ago
parent 83f648fd87
commit 3a97acfb51
Signed by: jeff
GPG Key ID: 025C02EE3A092F2D
  1. 2
      llarp/net/net.cpp

@ -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