From 3a97acfb519824056966b9ab56ab0112d1513e07 Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 21 Jul 2022 07:19:43 -0400 Subject: [PATCH] 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 --- llarp/net/net.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llarp/net/net.cpp b/llarp/net/net.cpp index d8ef6698e..419a718fd 100644 --- a/llarp/net/net.cpp +++ b/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++; }