mirror of
https://github.com/slackhq/nebula.git
synced 2026-05-10 22:22:27 -07:00
yey
This commit is contained in:
parent
4c2ea20e0c
commit
2c30f016a4
1 changed files with 5 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue