From: Eric Blake <eblake@redhat.com>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>, qemu-devel@nongnu.org
Cc: jan.kiszka@siemens.com, thuth@redhat.com, jasowang@redhat.com,
armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCHv2] slirp: Allow to disable IPv4 or IPv6
Date: Thu, 24 Mar 2016 15:36:19 -0600 [thread overview]
Message-ID: <56F45DD3.9080103@redhat.com> (raw)
In-Reply-To: <1458853245-7363-1-git-send-email-samuel.thibault@ens-lyon.org>
[-- Attachment #1: Type: text/plain, Size: 2920 bytes --]
On 03/24/2016 03:00 PM, Samuel Thibault wrote:
In the subject line: "Allow to" is not idiomatic English. "Allow"
requires either a subject ("Allow someone to disable"), or a gerund
("Allow disabling").
> Make net=none disable IPv4 and ip6-net=none disable IPv6, so the user can
> setup IPv4-only and IPv6-only network environments.
This mentions 'net=none', but I don't see that in the patch below;
instead I see a new boolean.
>
> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> ---
> +++ b/qapi-schema.json
> @@ -2425,9 +2425,16 @@
> #
> # @restrict: #optional isolate the guest from the host
> #
> +# @ip4: #optional whether to support IPv4, default is to support both IPv4 and IPv6.
> +#
> +# @ip6: #optional whether to support IPv6, default is to support both IPv4 and IPv6.
> +#
Missing '(since 2.6)' decorations (or 2.7, if this is too late for 2.6).
> # @ip: #optional legacy parameter, use net= instead
> #
> -# @net: #optional IP address and optional netmask
> +# @net: #optional IP network address that the guest will see, in the
> +# form addr[/netmask] (default is 10.0.2.0/24). The netmask is optional,
> +# and can be either in the form a.b.c.d or as a number of valid top-most
> +# bits.
What happens if 'net' is provided but 'ip4' is false? Is that a user error?
The existing 'InetSocketAddress' QAPI type spells these as 'ipv4' and
ipv6'; should we use the same spelling for consistency?
> #
> # @host: #optional guest-visible address of the host
> #
> @@ -2443,7 +2450,9 @@
> # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
> # to the guest
> #
> -# @ip6-prefix: #optional IPv6 network prefix (default is fec0::) (since 2.6)
> +# @ip6-prefix: #optional IPv6 network prefix (default is fec0::) (since
> +# 2.6). The network prefix is given in the usual hexadecimal IPv6
> +# address notation.
Likeiwse if 'ip6-prefix' is provided but 'ip6' is false?
What if both 'ip4' and 'ip6' are false, user error?
Was the intent to allow 'ip6-prefix':'none' as the special case for
disabling IPv6? At least the new 'ip6' boolean is introspectible;
adding a special-case interpretation of an existing field is not.
> @item net=@var{addr}[/@var{mask}]
> -Set IP network address the guest will see. Optionally specify the netmask,
> -either in the form a.b.c.d or as number of valid top-most bits. Default is
> -10.0.2.0/24.
> +Set IP network address the guest will see or 'none'. Default is
> +10.0.2.0/24. The netmask is optional, and can be either in the form
> +a.b.c.d or as number of valid top-most bits. 'none' disables IPv4
> +completely.
HMP can have syntactic sugar; I'm just fine if HMP's net=none translates
into QMP's 'ip4':false.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-03-24 21:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-24 21:00 [Qemu-devel] [PATCHv2] slirp: Allow to disable IPv4 or IPv6 Samuel Thibault
2016-03-24 21:36 ` Eric Blake [this message]
2016-03-24 21:41 ` Samuel Thibault
2016-03-24 21:44 ` Samuel Thibault
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=56F45DD3.9080103@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=jasowang@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=samuel.thibault@ens-lyon.org \
--cc=thuth@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).