From: Eric Blake <eblake@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>, qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Kevin Wolf" <kwolf@redhat.com>, "Max Reitz" <mreitz@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Juan Quintela" <quintela@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 8/8] sockets: fix parsing of ipv4/ipv6 opts in parse_socket_addr
Date: Thu, 10 Aug 2017 13:35:15 -0500 [thread overview]
Message-ID: <a9553758-f0b3-f8c8-2457-41c389203602@redhat.com> (raw)
In-Reply-To: <20170810160451.32723-9-berrange@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1818 bytes --]
On 08/10/2017 11:04 AM, Daniel P. Berrange wrote:
> The inet_parse() function looks for 'ipv4' and 'ipv6'
> flags, but only treats them as bare bool flags. The normal
> QemuOpts parsing would allow on/off values to be set too.
>
> This updated inet_parse() so that its handling of the
s/updated/updates/ ?
> 'ipv4' and 'ipv6' flags matches that done by QemuOpts.
Do we have a regression compared to any previous version, such that this
patch might be considered 2.10 material? Offhand, though, I think it's
fine as the end of your series, waiting for 2.11.
>
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
> tests/test-sockets-proto.c | 13 -------------
> util/qemu-sockets.c | 36 ++++++++++++++++++++++++++++++++----
> 2 files changed, 32 insertions(+), 17 deletions(-)
>
> +++ b/util/qemu-sockets.c
> @@ -616,6 +616,25 @@ err:
> }
>
> /* compatibility wrapper */
> +static int inet_parse_flag(const char *flagname, const char *optstr, bool *val,
> + Error **errp)
> +{
> + char *end;
> + size_t len;
> +
> + end = strstr(optstr, ",");
Do we need to check that we are not landing on a ',,' escape that would
make QemuOpts behave differently? [That is, ipv4=on,,garbage should be
parsed as setting ipv4 to 'on,garbage' (which is not valid), and NOT
setting 'ipv4=on' followed by the 'garbage' or ',garbage' key - while
the key named 'garbage' would fail, there might be other key names where
the distinction matters for catching command line typos]
But if this is unrelated to QemuOpts escape parsing, it seems okay.
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
next prev parent reply other threads:[~2017-08-10 18:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-10 16:04 [Qemu-devel] [PATCH 0/8] Enable full IPv4/IPv6 dual stack support Daniel P. Berrange
2017-08-10 16:04 ` [Qemu-devel] [PATCH 1/8] tests: add functional test validating ipv4/ipv6 address flag handling Daniel P. Berrange
2017-08-10 16:04 ` [Qemu-devel] [PATCH 2/8] io: introduce a network socket listener API Daniel P. Berrange
2017-08-10 18:12 ` Eric Blake
2017-08-11 9:15 ` Daniel P. Berrange
2017-08-11 10:18 ` Daniel P. Berrange
2017-08-11 12:26 ` Dr. David Alan Gilbert
2017-08-11 12:29 ` Daniel P. Berrange
2017-08-11 12:39 ` Dr. David Alan Gilbert
2017-08-11 12:48 ` Daniel P. Berrange
2017-08-10 16:04 ` [Qemu-devel] [PATCH 3/8] blockdev: convert internal NBD server to QIONetListener Daniel P. Berrange
2017-08-10 18:15 ` Eric Blake
2017-08-10 16:04 ` [Qemu-devel] [PATCH 4/8] blockdev: convert qemu-nbd " Daniel P. Berrange
2017-08-10 18:27 ` Eric Blake
2017-08-10 16:04 ` [Qemu-devel] [PATCH 5/8] migration: convert socket " Daniel P. Berrange
2017-08-10 16:04 ` [Qemu-devel] [PATCH 6/8] chardev: convert the " Daniel P. Berrange
2017-08-10 16:04 ` [Qemu-devel] [PATCH 7/8] ui: convert VNC " Daniel P. Berrange
2017-08-10 16:04 ` [Qemu-devel] [PATCH 8/8] sockets: fix parsing of ipv4/ipv6 opts in parse_socket_addr Daniel P. Berrange
2017-08-10 18:35 ` Eric Blake [this message]
2017-08-11 9:22 ` Daniel P. Berrange
2017-08-10 16:33 ` [Qemu-devel] [PATCH 0/8] Enable full IPv4/IPv6 dual stack support no-reply
2017-08-10 16:33 ` no-reply
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=a9553758-f0b3-f8c8-2457-41c389203602@redhat.com \
--to=eblake@redhat.com \
--cc=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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).