summaryrefslogtreecommitdiffhomepage
path: root/tun_freebsd.go
diff options
context:
space:
mode:
Diffstat (limited to 'tun_freebsd.go')
-rw-r--r--tun_freebsd.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/tun_freebsd.go b/tun_freebsd.go
index 80d5909..dfd5d46 100644
--- a/tun_freebsd.go
+++ b/tun_freebsd.go
@@ -306,12 +306,7 @@ func CreateTUN(name string) (TUNDevice, error) {
return nil, fmt.Errorf("failed to rename %s to %s: %s", assignedName, name, errno.Error())
}
- tun, err := CreateTUNFromFile(tunfile)
-
- if err != nil {
- return nil, err
- }
- return tun, err
+ return CreateTUNFromFile(tunfile)
}
func CreateTUNFromFile(file *os.File) (TUNDevice, error) {