From 1deb5d98e83614200e647afa19bb511e4f814294 Mon Sep 17 00:00:00 2001 From: Nathan Brown Date: Thu, 22 Apr 2021 15:23:40 -0500 Subject: [PATCH] Fix tun funcs for ios and android (#446) --- tun_android.go | 2 +- tun_ios.go | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tun_android.go b/tun_android.go index 11e9e35..370ae65 100644 --- a/tun_android.go +++ b/tun_android.go @@ -42,7 +42,7 @@ func newTunFromFd(l *logrus.Logger, deviceFd int, cidr *net.IPNet, defaultMTU in return } -func newTun(deviceName string, cidr *net.IPNet, defaultMTU int, routes []route, unsafeRoutes []route, txQueueLen int, multiqueue bool) (ifce *Tun, err error) { +func newTun(l *logrus.Logger, deviceName string, cidr *net.IPNet, defaultMTU int, routes []route, unsafeRoutes []route, txQueueLen int, multiqueue bool) (ifce *Tun, err error) { return nil, fmt.Errorf("newTun not supported in Android") } diff --git a/tun_ios.go b/tun_ios.go index 6e64d23..41fb3ca 100644 --- a/tun_ios.go +++ b/tun_ios.go @@ -11,6 +11,8 @@ import ( "os" "sync" "syscall" + + "github.com/sirupsen/logrus" ) type Tun struct { @@ -19,11 +21,11 @@ type Tun struct { Cidr *net.IPNet } -func newTun(deviceName string, cidr *net.IPNet, defaultMTU int, routes []route, unsafeRoutes []route, txQueueLen int, multiqueue bool) (ifce *Tun, err error) { +func newTun(l *logrus.Logger, deviceName string, cidr *net.IPNet, defaultMTU int, routes []route, unsafeRoutes []route, txQueueLen int, multiqueue bool) (ifce *Tun, err error) { return nil, fmt.Errorf("newTun not supported in iOS") } -func newTunFromFd(deviceFd int, cidr *net.IPNet, defaultMTU int, routes []route, unsafeRoutes []route, txQueueLen int) (ifce *Tun, err error) { +func newTunFromFd(l *logrus.Logger, deviceFd int, cidr *net.IPNet, defaultMTU int, routes []route, unsafeRoutes []route, txQueueLen int) (ifce *Tun, err error) { if len(routes) > 0 { return nil, fmt.Errorf("route MTU not supported in Darwin") }