]> Cypherpunks.ru repositories - govpn.git/blobdiff - src/cypherpunks.ru/govpn/tap_darwin.go
fix darwin build
[govpn.git] / src / cypherpunks.ru / govpn / tap_darwin.go
index 2e1b67313e8734630c82f32f9009254d246e4752..766597cf8f25ffba1d183cfac097da4fb1bb8f32 100644 (file)
@@ -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")