From: Stefan Weil <sw@weilnetz.de>
To: Andrew Baumann <Andrew.Baumann@microsoft.com>, qemu-devel@nongnu.org
Cc: Jason Wang <jasowang@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/2] tap-win32: skip unexpected nodes during registry enumeration
Date: Wed, 18 Nov 2015 08:25:26 +0100 [thread overview]
Message-ID: <564C27E6.5070600@weilnetz.de> (raw)
In-Reply-To: <1447787363-15216-2-git-send-email-Andrew.Baumann@microsoft.com>
Am 17.11.2015 um 20:09 schrieb Andrew Baumann:
> 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)) {
Good catch!
Reviewed-by: Stefan Weil <sw@weilnetz.de>
next prev parent reply other threads:[~2015-11-18 7:25 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 ` [Qemu-devel] [PATCH 1/2] tap-win32: skip unexpected nodes during registry enumeration Andrew Baumann
2015-11-18 7:25 ` Stefan Weil [this message]
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=564C27E6.5070600@weilnetz.de \
--to=sw@weilnetz.de \
--cc=Andrew.Baumann@microsoft.com \
--cc=jasowang@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.