From a3e6316aa7b1d80098ad49732a05aec1c9b62849 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 8 Aug 2021 15:25:31 +0200 Subject: tunnel: increase tun creation retry boot timer to 10 minutes Some failures, such as EPT_S_NOT_REGISTERED, apparently can take 5 minutes, so extend this to 10 minutes to be sure. Link: https://lists.zx2c4.com/pipermail/wireguard/2021-August/006908.html Reported-by: Joshua Sjoding Signed-off-by: Jason A. Donenfeld --- tunnel/service.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tunnel/service.go b/tunnel/service.go index a595994c..a5f1df4c 100644 --- a/tunnel/service.go +++ b/tunnel/service.go @@ -176,7 +176,7 @@ func (service *tunnelService) Execute(args []string, r <-chan svc.ChangeRequest, } var rebootRequired bool adapter, rebootRequired, err = driver.DefaultPool.CreateAdapter(config.Name, deterministicGUID(config)) - if err == nil || windows.DurationSinceBoot() > time.Minute*4 { + if err == nil || windows.DurationSinceBoot() > time.Minute*10 { if rebootRequired { log.Println("Windows indicated a reboot is required.") } @@ -209,7 +209,7 @@ func (service *tunnelService) Execute(args []string, r <-chan svc.ChangeRequest, log.Printf("Retrying adapter creation after failure because system just booted (T+%v): %v", windows.DurationSinceBoot(), err) } wintun, err = tun.CreateTUNWithRequestedGUID(config.Name, deterministicGUID(config), 0) - if err == nil || windows.DurationSinceBoot() > time.Minute*4 { + if err == nil || windows.DurationSinceBoot() > time.Minute*10 { break } } -- cgit v1.3-18-gd494