diff options
author | Simon Rozman <simon@rozman.si> | 2019-03-07 15:19:27 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-03-07 21:12:20 +0100 |
commit | 11f57802506045a137d0e2022bfb16da4fc624f1 (patch) | |
tree | 8efba04077937a091600f3943d285d498e8b1c08 /tun/wintun/setupapi/mksyscall.go | |
parent | 26af6c4651dbba986c1d05162e9ef1906665da92 (diff) |
wintun: Revise interface creation wait
DIF_INSTALLDEVICE returns almost immediately, while the device
installation continues in the background. It might take a while, before
all registry keys and values are populated.
Previously, wireguard-go waited for HKLM\SYSTEM\CurrentControlSet\
Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\<id> registry key
only.
Followed by a SetInterfaceName() method of Wintun struct which tried to
access HKLM\SYSTEM\CurrentControlSet\Control\Network\
{4D36E972-E325-11CE-BFC1-08002BE10318}\<id>\Connection registry key
might not be available yet.
This commit loops until both registry keys are available before
returning from CreateInterface() function.
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'tun/wintun/setupapi/mksyscall.go')
0 files changed, 0 insertions, 0 deletions