wintun: add FlushInterface stub

This commit is contained in:
Jason A. Donenfeld
2019-02-07 18:24:28 +01:00
parent 2efafecab5
commit c4b43e35a7
2 changed files with 18 additions and 4 deletions

View File

@@ -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 {