mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
get the fd instead of depending on water to do it
This commit is contained in:
parent
3eccca62cc
commit
cd0d1a1d26
2 changed files with 6 additions and 15 deletions
|
@ -2,12 +2,13 @@
|
|||
|
||||
package yggdrasil
|
||||
|
||||
import "os"
|
||||
import "os/exec"
|
||||
import "unsafe"
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
import water "github.com/yggdrasil-network/water"
|
||||
import "github.com/yggdrasil-network/water"
|
||||
|
||||
type in6_addrlifetime struct {
|
||||
ia6t_expire float64
|
||||
|
@ -61,7 +62,7 @@ func (tun *tunDevice) setup(ifname string, iftapmode bool, addr string, mtu int)
|
|||
}
|
||||
|
||||
func (tun *tunDevice) setupAddress(addr string) error {
|
||||
fd := tun.iface.FD().Fd()
|
||||
fd := tun.iface.ReadWriteCloser.(*os.File).Fd()
|
||||
var err error
|
||||
var ti tuninfo
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue