diff options
author | Daniel P. Berrange | 2017-05-17 15:34:36 +0200 |
---|---|---|
committer | Daniel P. Berrange | 2017-07-14 15:28:29 +0200 |
commit | 563a3987b980a36e6941720a99d5cf36960f78ea (patch) | |
tree | 2a116f41f2982fdcba24cce7509650ebe93cbd35 /util/qemu-sockets.c | |
parent | sockets: ensure we don't accept IPv4 clients when IPv4 is disabled (diff) | |
download | qemu-563a3987b980a36e6941720a99d5cf36960f78ea.tar.gz qemu-563a3987b980a36e6941720a99d5cf36960f78ea.tar.xz qemu-563a3987b980a36e6941720a99d5cf36960f78ea.zip |
io: preserve ipv4/ipv6 flags when resolving InetSocketAddress
The original InetSocketAddress struct may have has_ipv4 and
has_ipv6 fields set, which will control both the ai_family
used during DNS resolution, and later use of the V6ONLY
flag.
Currently the standalone DNS resolver code drops the
has_ipv4 & has_ipv6 flags after resolving, which means
the later bind() code won't correctly set V6ONLY.
This fixes the following scenarios
-vnc :0,ipv4=off
-vnc :0,ipv6=on
-vnc :::0,ipv4=off
-vnc :::0,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 'util/qemu-sockets.c')
0 files changed, 0 insertions, 0 deletions