WireGuard for Windows 0.4.2 failed to start due to WintunSetAdapterName failure (Code 0x000006D9)
Jason A. Donenfeld
Jason at zx2c4.com
Sun Aug 8 00:28:35 UTC 2021
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
More information about the WireGuard
mailing list