On 03/24/2016 05:34 PM, Samuel Thibault wrote: > Add ipv4 and ipv6 boolean options, so the user can setup IPv4-only and > IPv6-only network environments. > > Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> > > --- >
> @@ -812,10 +822,18 @@ int net_init_slirp(const NetClientOptions *opts, const > char *name, > int ret; > const NetdevUserOptions *user; > const char **dnssearch; > + int ipv4 = 1, ipv6 = 1; These should be bool, and set to true. > > assert(opts->type == NET_CLIENT_OPTIONS_KIND_USER); > user = opts->u.user.data; > > + if ((user->has_ipv6 && user->ipv6 && !user->has_ipv4) > + || (user->has_ipv4 && !user->ipv4)) > + ipv4 = 0; Inconsistent with current qemu style. Should be: if ((user->has_ipv6 && user->ipv6 && !user->has_ipv4) || (user->has_ipv4 && !user->ipv4)) { ipv4 = false; } In particular, the missing {} (should) fail ./scripts/checkpatch.pl. > + if ((user->has_ipv4 && user->ipv4 && !user->has_ipv6) > + || (user->has_ipv6 && !user->ipv6)) > + ipv6 = 0; More missing {} and unusual indentation. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature