Skip to content
Commit ee0428e3 authored by Andrew Baumann's avatar Andrew Baumann Committed by Jason Wang
Browse files

tap-win32: skip unexpected nodes during registry enumeration



In order to find a named tap device, get_device_guid() enumerates children of
HKLM\SYSTEM\CCS\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}
(aka NETWORK_CONNECTIONS_KEY). For each child, it then looks for a
"Connection" subkey, but if this key doesn't exist, it aborts the
entire search. This was observed to fail on at least one Windows 10
machine, where there is an additional child of NETWORK_CONNECTIONS_KEY
(named "Descriptions"). Since registry enumeration doesn't guarantee
any particular sort order, we should continue to search for matching
children rather than aborting the search.

Signed-off-by: default avatarAndrew Baumann <Andrew.Baumann@microsoft.com>
Reviewed-by: default avatarStefan Weil <sw@weilnetz.de>
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
parent 00837731
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment