From 6fb2dff55a59729c442fb102148f2bfcb35cef95 Mon Sep 17 00:00:00 2001 From: Bruno Clermont Date: Fri, 10 Feb 2017 16:39:17 +0800 Subject: [PATCH] fix darwin build --- src/cypherpunks.ru/govpn/tap_darwin.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cypherpunks.ru/govpn/tap_darwin.go b/src/cypherpunks.ru/govpn/tap_darwin.go index 2e1b673..766597c 100644 --- a/src/cypherpunks.ru/govpn/tap_darwin.go +++ b/src/cypherpunks.ru/govpn/tap_darwin.go @@ -26,12 +26,12 @@ import ( "github.com/songgao/water" ) -func newTAPer(ifaceName string) (io.ReadWriteCloser, error) { - if !strings.HasPrefix(ifaceName, interfaceTun) { - return nil, errors.Wrap(errUnsupportedInterface, ifaceName) +func newTAPer(ifaceName *string) (io.ReadWriteCloser, error) { + if !strings.HasPrefix(*ifaceName, interfaceTun) { + return nil, errors.Wrap(errUnsupportedInterface, *ifaceName) } - if ifaceName != interfaceTun { - return nil, errors.Errorf("Darwin don't allow to set an interface name, only %q is supported", ifaceName) + if *ifaceName != interfaceTun { + return nil, errors.Errorf("Darwin don't allow to set an interface name, only %q is supported", *ifaceName) } output, err := water.New(water.Config{DeviceType: water.TUN}) return output, errors.Wrap(err, "water.New") -- 2.44.0