Samuel Thibault <samuel.thiba...@ens-lyon.org> writes:

> Make net=0.0.0.0 disable IPv4 and ip6-net=:: disable IPv6, so the user can
> setup IPv4-only and IPv6-only network environments.

Do "net=" and "ip6-net=" mean anything useful?  If not, wouldn't that be
a more natural way to switch off than abusing the wildcard address?

Quick interface review:

[...]
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 88f9b81..69eb6e7 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -2427,7 +2427,7 @@
>  #
>  # @ip: #optional legacy parameter, use net= instead
>  #
> -# @net: #optional IP address and optional netmask
> +# @net: #optional IP address and optional netmask. Set to 0.0.0.0 to disable 
> IPv4 completely

Long line.

Syntax?  Default value?

>  #
>  # @host: #optional guest-visible address of the host
>  #
> @@ -2443,7 +2443,7 @@
>  # @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. Set to :: to disable IPv6 
> completely (default is fec0::) (since 2.6)

Long line.  Syntax?

(default is fec0::) is now in a confusing spot.  Suggest

    # @ip6-prefix: #optional IPv6 network prefix (default is fec0::)
    # Set to :: to disable IPv6 completely.
    # (since 2.6)

>  #
>  # @ip6-prefixlen: #optional IPv6 network prefix length (default is 64) 
> (since 2.6)
>  #
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 732ed8c..4938213 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -1712,8 +1712,8 @@ Assign symbolic name for use in monitor commands.
>  
>  @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.
> +either in the form a.b.c.d or as number of valid top-most bits. Set to 
> 0.0.0.0
> +to disable IPv4 completely. Default is 10.0.2.0/24.

Long line.

>  @item host=@var{addr}
>  Specify the guest-visible address of the host. Default is the 2nd IP in the
> @@ -1721,7 +1721,8 @@ guest network, i.e. x.x.x.2.
>  
>  @item ip6-net=@var{addr}[/@var{int}]
>  Set IPv6 network address the guest will see. Optionally specify the prefix
> -size, as number of valid top-most bits. Default is fec0::/64.
> +size, as number of valid top-most bits. Set to :: to disable IPv6 completely.
> +Default is fec0::/64.
>  
>  @item ip6-host=@var{addr}
>  Specify the guest-visible IPv6 address of the host. Default is the 2nd IPv6 
> in
[...]

Reply via email to