On 05/19/2017 01:03 PM, Daniel P. Berrange wrote: > Currently if you disable listening on IPv4 addresses, via the > CLI flag ipv4=off, we still mistakenly accept IPv4 clients via > the IPv6 listener socket due to IPV6_V6ONLY flag being unset. > > We must ensure IPV6_V6ONLY is always set if ipv4=off > > This fixes the following scenarios > > -incoming tcp::9000,ipv6=on > -incoming tcp:[::]:9000,ipv6=on > -chardev socket,id=cdev0,host=,port=9000,server,nowait,ipv4=off > -chardev socket,id=cdev0,host=,port=9000,server,nowait,ipv6=on > -chardev socket,id=cdev0,host=::,port=9000,server,nowait,ipv4=off > -chardev socket,id=cdev0,host=::,port=9000,server,nowait,ipv6=on > > which all mistakenly accepted IPv4 clients > > Signed-off-by: Daniel P. Berrange <berra...@redhat.com> > --- > util/qemu-sockets.c | 40 +++++++++++++++++++++++++++++++--------- > 1 file changed, 31 insertions(+), 9 deletions(-) >
Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature