From c4b43e35a772305858e610d879c2b9d47f4d9866 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 7 Feb 2019 18:24:28 +0100 Subject: wintun: add FlushInterface stub --- tun/tun_windows.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tun/tun_windows.go') 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 { -- cgit v1.2.3-59-g8ed1b