From: Mike O'Connor <mike@pineview.net>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>,
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 11:09:20 +1030 [thread overview]
Message-ID: <af71a4b2-989a-da04-2fa6-9467ec58997f@pineview.net> (raw)
In-Reply-To: <CAHmME9q5a1MVUQU3Hr=T32pjoW-=Hz+KyoBvvKgLgwQwWNoCYw@mail.gmail.com>
Hi Jason
I'm not a windows users so can not test, but it seems to me that
Microsoft have API's to indicate the network status.
This to indicate if there is a connection
https://docs.microsoft.com/en-us/windows/win32/api/wininet/nf-wininet-internetgetconnectedstate
This to indicate if there is route-able service. It seem this is
deprecated for windows 10.
https://docs.microsoft.com/en-us/windows/win32/api/wininet/nf-wininet-internetcheckconnectiona
There is reference to a win10 version, in the notes.
Not sure if this helps
Cheers
Mike
On 29/1/21 10:53 am, Jason A. Donenfeld wrote:
> 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
next prev parent reply other threads:[~2021-01-29 0:39 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
2021-01-29 0:39 ` Mike O'Connor [this message]
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=af71a4b2-989a-da04-2fa6-9467ec58997f@pineview.net \
--to=mike@pineview.net \
--cc=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).