summaryrefslogtreecommitdiffstats
path: root/tests/test-bufferiszero.c
diff options
context:
space:
mode:
authorDaniel P. Berrange2017-05-17 15:17:55 +0200
committerDaniel P. Berrange2017-07-14 15:28:29 +0200
commit94bc0d19789b6f5ce881c4a06a3e1c431874cbbd (patch)
tree7a568a3fca6dec69661cda0d5817056a8e8f7887 /tests/test-bufferiszero.c
parentsockets: don't block IPv4 clients when listening on "::" (diff)
downloadqemu-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 'tests/test-bufferiszero.c')
0 files changed, 0 insertions, 0 deletions