]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
Temporary work around. Please revert me
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 15 May 2018 17:56:06 +0000 (19:56 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Tue, 15 May 2018 17:56:06 +0000 (19:56 +0200)
tun_darwin.go

index ed055b2bca887d89f14e8f76edc2180e583721c1..04badd97dec7e2b9781f5c993e1731a5aa27f6b9 100644 (file)
@@ -15,6 +15,7 @@ import (
        "io/ioutil"
        "net"
        "os"
+       "path/filepath"
        "time"
        "unsafe"
 )
@@ -107,6 +108,7 @@ func CreateTUN(name string) (TUNDevice, error) {
        if err == nil && name == "utun" {
                fname := os.Getenv("WG_DARWIN_UTUN_NAME_FILE")
                if fname != "" {
+                       os.MkdirAll(filepath.Dir(fname), 0700)
                        ioutil.WriteFile(fname, []byte(tun.(*NativeTun).name+"\n"), 0400)
                }
        }