aboutsummaryrefslogtreecommitdiffstats
path: root/tun/tun_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'tun/tun_windows.go')
-rw-r--r--tun/tun_windows.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/tun/tun_windows.go b/tun/tun_windows.go
index 9c635b5..43f0cec 100644
--- a/tun/tun_windows.go
+++ b/tun/tun_windows.go
@@ -75,17 +75,11 @@ func CreateTUNWithRequestedGUID(ifname string, requestedGUID *windows.GUID) (Dev
return nil, fmt.Errorf("Unable to delete already existing Wintun interface: %v", err)
}
}
- wt, _, err = WintunPool.CreateInterface(requestedGUID)
+ wt, _, err = WintunPool.CreateInterface(ifname, requestedGUID)
if err != nil {
return nil, fmt.Errorf("Unable to create Wintun interface: %v", err)
}
- err = wt.SetName(ifname)
- if err != nil {
- wt.DeleteInterface()
- return nil, fmt.Errorf("Unable to set name of Wintun interface: %v", err)
- }
-
tun := &NativeTun{
wt: wt,
handle: windows.InvalidHandle,