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>,
	Simon Rozman <simon@rozman.si>
Subject: Re: WireGuard for Windows 0.4.2 failed to start due to WintunSetAdapterName failure (Code 0x000006D9)
Date: Sun, 8 Aug 2021 02:28:35 +0200	[thread overview]
Message-ID: <CAHmME9opTHXHGFGVnD15hx_1g5-g8Qqrv_0U_Bjie2vU0KEDiQ@mail.gmail.com> (raw)
In-Reply-To: <CALaUSuusH4S23thAEj1zXp_4=WJ81cR5PETG6aHO9Of7ELViJw@mail.gmail.com>

Hi Joshua,

One interesting part of your log is the timestamps:

2021-08-06 19:46:44.047474: [TUN] [SCJ] [Wintun] SelectDriver: Using
existing driver 0.13
2021-08-06 19:51:51.408322: [TUN] [SCJ] [Wintun] WintunSetAdapterName:
Failed to set adapter name: There are no more endpoints available from
the endpoint mapper. (Code 0x000006D9)

Apparently it hung for almost exactly 5 minutes, before moving onto
the next step, which then died with the mysterious
EPT_S_NOT_REGISTERED error, presumably caused by
nci.dll->netsetupapi.dll->rpcrt4.dll. One strategy would be to put
yet-another-sleep-retry loop over SetAdapterName, but I imagine that
it'd still fail anyway, with the previous step somehow failing
silently after a 5 minute timeout, and not actually setting up the
interface, perhaps during registration. That's unfortunate.

Ultimately, after the 5 minute pause, it was no longer within 4
minutes of system boot, so it didn't try again. I could increase that
heuristic to be a bit larger than 4 minutes -- perhaps I should make
it 10? But ultimately that's just a heuristic.

Better would be to find the proper set of services that wireguard
should start after. Right now we pick "Nsi" and "TcpIp". We need
another one in there, perhaps, but I'm not yet sure what. "netprofm"
maybe? I'm open to suggestions here if you have any intuition on
Windows boot processes.

Jason

  reply	other threads:[~2021-08-08  0:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-07 23:38 Joshua Sjoding
2021-08-08  0:28 ` Jason A. Donenfeld [this message]
2021-08-08 13:28   ` 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=CAHmME9opTHXHGFGVnD15hx_1g5-g8Qqrv_0U_Bjie2vU0KEDiQ@mail.gmail.com \
    --to=jason@zx2c4.com \
    --cc=joshua.sjoding@scjalliance.com \
    --cc=simon@rozman.si \
    --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).