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

jeff (codeaholic) 2022-07-21 07:19:43 -04:00
parent 83f648fd87
commit 3a97acfb51
Signed by: jeff
GPG Key ID: 025C02EE3A092F2D
1 changed files with 1 additions and 1 deletions

View File

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