qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCHv2] slirp: Allow to disable IPv4 or IPv6


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCHv2] slirp: Allow to disable IPv4 or IPv6
Date: Thu, 24 Mar 2016 15:36:19 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

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 <address@hidden>
> ---

> +++ 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 address@hidden/@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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]