]> Cypherpunks.ru repositories - govpn.git/blobdiff - src/cypherpunks.ru/govpn/tap_darwin.go
Language mistakes and stylistic fixes
[govpn.git] / src / cypherpunks.ru / govpn / tap_darwin.go
index cbb0212753e7b38f251863fa3c329efa17e82dab..8f0247ca3f638dea25b89558746e4d5bed6a8dfb 100644 (file)
@@ -1,6 +1,6 @@
 /*
 GoVPN -- simple secure free software virtual private network daemon
-Copyright (C) 2014-2016 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2017 Bruno Clermont <bruno@robotinfra.com>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -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 does not 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")