From: Andrew Baumann <Andrew.Baumann@microsoft.com>
To: qemu-devel@nongnu.org
Cc: Stefan Weil <sw@weilnetz.de>, Jason Wang <jasowang@redhat.com>,
Andrew Baumann <Andrew.Baumann@microsoft.com>
Subject: [Qemu-devel] [PATCH 1/2] tap-win32: skip unexpected nodes during registry enumeration
Date: Tue, 17 Nov 2015 11:09:22 -0800 [thread overview]
Message-ID: <1447787363-15216-2-git-send-email-Andrew.Baumann@microsoft.com> (raw)
In-Reply-To: <1447787363-15216-1-git-send-email-Andrew.Baumann@microsoft.com>
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: Andrew Baumann <Andrew.Baumann@microsoft.com>
---
net/tap-win32.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/tap-win32.c b/net/tap-win32.c
index 4e2fa55..5e5d6db 100644
--- a/net/tap-win32.c
+++ b/net/tap-win32.c
@@ -356,7 +356,8 @@ static int get_device_guid(
&len);
if (status != ERROR_SUCCESS || name_type != REG_SZ) {
- return -1;
+ ++i;
+ continue;
}
else {
if (is_tap_win32_dev(enum_name)) {
--
2.5.3
next prev parent reply other threads:[~2015-11-17 19:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 19:09 [Qemu-devel] [PATCH 0/2] net/tap-win32 bugfixes Andrew Baumann
2015-11-17 19:09 ` Andrew Baumann [this message]
2015-11-18 7:25 ` [Qemu-devel] [PATCH 1/2] tap-win32: skip unexpected nodes during registry enumeration Stefan Weil
2015-11-17 19:09 ` [Qemu-devel] [PATCH 2/2] tap-win32: disable broken async write path Andrew Baumann
2015-11-18 7:39 ` Stefan Weil
2015-11-18 18:33 ` Andrew Baumann
2015-11-18 2:07 ` [Qemu-devel] [PATCH 0/2] net/tap-win32 bugfixes Jason Wang
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=1447787363-15216-2-git-send-email-Andrew.Baumann@microsoft.com \
--to=andrew.baumann@microsoft.com \
--cc=jasowang@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
/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).