From 2c30f016a410aa46fcaea92d48ceb4768600cc09 Mon Sep 17 00:00:00 2001 From: JackDoan Date: Wed, 15 Apr 2026 16:15:19 -0500 Subject: [PATCH] yey --- overlay/tun_linux.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/overlay/tun_linux.go b/overlay/tun_linux.go index 97d34980..c44e07eb 100644 --- a/overlay/tun_linux.go +++ b/overlay/tun_linux.go @@ -71,8 +71,12 @@ type ifreqQLEN struct { } func newTunFromFd(c *config.C, l *logrus.Logger, deviceFd int, vpnNetworks []netip.Prefix) (*tun, error) { - //todo if this actually gets called, it should check+set O_NONBLOCK file := os.NewFile(uintptr(deviceFd), "/dev/net/tun") + err := unix.SetNonblock(deviceFd, true) + if err != nil { + _ = file.Close() + return nil, err + } t, err := newTunGeneric(c, l, file, vpnNetworks) if err != nil {