Development discussion of WireGuard
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Joshua Sjoding <joshua.sjoding@scjalliance.com>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: WireGuard for Windows tunnel deactivation after prolonged resolution failure during startup
Date: Fri, 29 Jan 2021 01:23:25 +0100	[thread overview]
Message-ID: <CAHmME9q5a1MVUQU3Hr=T32pjoW-=Hz+KyoBvvKgLgwQwWNoCYw@mail.gmail.com> (raw)
In-Reply-To: <CALaUSuuB=+ZDTsTaVs-pswd6fsu6CvZgO4b76HPGQZmwxssN0w@mail.gmail.com>

Hi Joshua,

Thanks for the bug report. Windows is usually all about heuristics.
Here's the current algorithm:

- If the system has booted within the last 4 minutes, it retries 40
times. Otherwise it retries 10 times.
- If the resolution fails with a temporary error, or if it fails with
a permanent error but there's no available internet connection, then
we sleep for 4 seconds and try again.
- If we try the 40 or 10 times over the 160 or 40 seconds and don't
succeed, then we fail and shut down the service.

It sounds like that set of heuristics isn't working out so great for
your use case. How long do those computers usually take to obtain an
Internet connection? If you could run some estimates on that, and come
up with some reasonable length of time ("not more than 3 minutes" for
example) then maybe we could just double that and make it the new
timeout? Or maybe you have a different idea?

Jason

  reply	other threads:[~2021-01-29  0:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28 22:54 Joshua Sjoding
2021-01-29  0:23 ` Jason A. Donenfeld [this message]
2021-01-29  0:39   ` Mike O'Connor
2021-01-29  0:54     ` Jason A. Donenfeld
2021-01-29  1:02     ` Joshua Sjoding
2021-01-29 20:14       ` Jason A. Donenfeld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHmME9q5a1MVUQU3Hr=T32pjoW-=Hz+KyoBvvKgLgwQwWNoCYw@mail.gmail.com' \
    --to=jason@zx2c4.com \
    --cc=joshua.sjoding@scjalliance.com \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).