diff options
author | Daniel P. Berrange | 2017-05-17 15:17:55 +0200 |
---|---|---|
committer | Daniel P. Berrange | 2017-07-14 15:28:29 +0200 |
commit | 94bc0d19789b6f5ce881c4a06a3e1c431874cbbd (patch) | |
tree | 7a568a3fca6dec69661cda0d5817056a8e8f7887 /include/hw/misc/arm_integrator_debug.h | |
parent | sockets: don't block IPv4 clients when listening on "::" (diff) | |
download | qemu-94bc0d19789b6f5ce881c4a06a3e1c431874cbbd.tar.gz qemu-94bc0d19789b6f5ce881c4a06a3e1c431874cbbd.tar.xz qemu-94bc0d19789b6f5ce881c4a06a3e1c431874cbbd.zip |
sockets: ensure we don't accept IPv4 clients when IPv4 is disabled
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
Acked-by: Gerd Hoffmann <kraxel@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'include/hw/misc/arm_integrator_debug.h')
0 files changed, 0 insertions, 0 deletions