From dcf80435a499f89f9ee7af935dedc6a50b8274d7 Mon Sep 17 00:00:00 2001 From: Harry Harpham Date: Thu, 20 Nov 2025 16:23:19 -0700 Subject: [PATCH] Commit untested Windows code TODO: get access to a Windows machine / VM and test Signed-off-by: Harry Harpham --- net/netns/netns_windows.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/netns/netns_windows.go b/net/netns/netns_windows.go index afbda0f47..4f488035c 100644 --- a/net/netns/netns_windows.go +++ b/net/netns/netns_windows.go @@ -58,6 +58,12 @@ func controlC(logf logger.Logf, network, address string, c syscall.RawConn) (err return nil } + // Unix sockets cannot be bound to an interface. + // TODO: is this Unix socket exception necessary on Windows? presumably... + if network == "unix" { + return nil + } + canV4, canV6 := false, false switch network { case "tcp", "udp":