summary refs log tree commit diff stats
path: root/scripts/tracetool/format/h.py
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2017-05-17 14:17:55 +0100
committerDaniel P. Berrange <berrange@redhat.com>2017-07-14 14:28:29 +0100
commit94bc0d19789b6f5ce881c4a06a3e1c431874cbbd (patch)
tree7a568a3fca6dec69661cda0d5817056a8e8f7887 /scripts/tracetool/format/h.py
parent4dc5d815c43b0138e5d6753e788343f6e2cb6b5f (diff)
downloadfocaccia-qemu-94bc0d19789b6f5ce881c4a06a3e1c431874cbbd.tar.gz
focaccia-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 'scripts/tracetool/format/h.py')
0 files changed, 0 insertions, 0 deletions