From: Bruno Clermont Date: Fri, 10 Feb 2017 08:39:17 +0000 (+0800) Subject: fix darwin build X-Git-Url: http://www.git.cypherpunks.ru/?p=govpn.git;a=commitdiff_plain;h=6fb2dff55a59729c442fb102148f2bfcb35cef95 fix darwin build --- 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")