From 204500f7a0f2451d90728975eda5347c1f3338d2 Mon Sep 17 00:00:00 2001 From: Owen Date: Mon, 24 Nov 2025 16:09:56 -0500 Subject: [PATCH] We dont need to wait for the interface anymore --- olm/interface_windows.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/olm/interface_windows.go b/olm/interface_windows.go index 6427723..cf769bf 100644 --- a/olm/interface_windows.go +++ b/olm/interface_windows.go @@ -6,7 +6,6 @@ import ( "fmt" "net" "net/netip" - "time" "github.com/fosrl/newt/logger" "golang.zx2c4.com/wireguard/windows/tunnel/winipcfg" @@ -50,11 +49,15 @@ func configureWindows(interfaceName string, ip net.IP, ipNet *net.IPNet) error { return fmt.Errorf("failed to add IP address: %v", err) } - // Wait for the interface to be up and have the correct IP - err = waitForInterfaceUp(interfaceName, ip, 30*time.Second) - if err != nil { - return fmt.Errorf("interface did not come up within timeout: %v", err) - } + // This was required when we were using the subprocess "netsh" command to bring up the interface. + // With the winipcfg library, the interface should already be up after adding the IP so we dont + // need this step anymore as far as I can tell. + + // // Wait for the interface to be up and have the correct IP + // err = waitForInterfaceUp(interfaceName, ip, 30*time.Second) + // if err != nil { + // return fmt.Errorf("interface did not come up within timeout: %v", err) + // } return nil }