From 373a5f18d6cc04ae3fb2be1474e59bfe13272ff7 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 26 Oct 2018 20:27:44 +0200 Subject: tools: update submodules Signed-off-by: Jason A. Donenfeld --- app/tools/libwg-go/src/tun/api-android.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'app/tools/libwg-go/src/tun/api-android.go') diff --git a/app/tools/libwg-go/src/tun/api-android.go b/app/tools/libwg-go/src/tun/api-android.go index 90986c4d..4f0dd968 100644 --- a/app/tools/libwg-go/src/tun/api-android.go +++ b/app/tools/libwg-go/src/tun/api-android.go @@ -11,11 +11,13 @@ import ( ) func CreateTUNFromFD(tun_fd int) (TUNDevice, string, error) { + file := os.NewFile(uintptr(tun_fd), "/dev/tun") tun := &nativeTun{ - fd: os.NewFile(uintptr(tun_fd), "/dev/tun"), - events: make(chan TUNEvent, 5), - errors: make(chan error, 5), - nopi: true, + tunFile: file, + fd: file.Fd(), + events: make(chan TUNEvent, 5), + errors: make(chan error, 5), + nopi: true, } var err error tun.fdCancel, err = rwcancel.NewRWCancel(tun_fd) -- cgit v1.2.3-59-g8ed1b