wgengine: make NewUserspaceEngine wait for TUN interface to be up on Windows

Updates #474

Signed-off-by: Aleksandar Pesic <peske.nis@gmail.com>
This commit is contained in:
Aleksandar Pesic
2021-02-23 04:29:54 +01:00
committed by Brad Fitzpatrick
parent ea3715e3ce
commit daf6de4f14
3 changed files with 134 additions and 0 deletions

View File

@ -187,6 +187,10 @@ func NewUserspaceEngine(logf logger.Logf, tunName string, listenPort uint16) (En
}
logf("CreateTUN ok.")
if err := waitInterfaceUp(tun, 90*time.Second, logf); err != nil {
return nil, err
}
conf := EngineConfig{
Logf: logf,
TUN: tun,