diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2017-05-17 14:17:55 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2017-07-14 14:28:29 +0100 |
commit | 94bc0d19789b6f5ce881c4a06a3e1c431874cbbd (patch) | |
tree | 7a568a3fca6dec69661cda0d5817056a8e8f7887 /io | |
parent | 4dc5d815c43b0138e5d6753e788343f6e2cb6b5f (diff) |
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 'io')
0 files changed, 0 insertions, 0 deletions