mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-15 16:36:52 +01:00
yey
This commit is contained in:
1 parent
4c2ea20e0c
commit
2c30f016a4
1 file changed
+5
-1
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user