aboutsummaryrefslogtreecommitdiffstats
path: root/tun/tun_windows.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-02-07 18:24:28 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-02-07 18:24:28 +0100
commitc4b43e35a772305858e610d879c2b9d47f4d9866 (patch)
tree481779caaf60a709e621e61ac37cf969fb85b89e /tun/tun_windows.go
parentmain_windows: Get iface name from argument (diff)
downloadwireguard-go-c4b43e35a772305858e610d879c2b9d47f4d9866.tar.xz
wireguard-go-c4b43e35a772305858e610d879c2b9d47f4d9866.zip
wintun: add FlushInterface stub
Diffstat (limited to 'tun/tun_windows.go')
-rw-r--r--tun/tun_windows.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/tun/tun_windows.go b/tun/tun_windows.go
index 6449974..5f4f22a 100644
--- a/tun/tun_windows.go
+++ b/tun/tun_windows.go
@@ -65,6 +65,11 @@ func CreateTUN(ifname string) (TUNDevice, error) {
// Set interface name. (Ignore errors.)
wt.SetInterfaceName(ifname)
}
+ err = wt.FlushInterface()
+ if err != nil {
+ wt.DeleteInterface(0)
+ return nil, err
+ }
signalNameUTF16, err := windows.UTF16PtrFromString(wt.SignalEventName())
if err != nil {