qemu-e2k/io
Daniel P. Berrange 563a3987b9 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>
2017-07-14 14:28:29 +01:00
..
channel-buffer.c io: avoid double-free when closing QIOChannelBuffer 2016-05-26 11:31:09 +05:30
channel-command.c io: add methods to set I/O handlers on AioContext 2017-02-21 11:14:07 +00:00
channel-file.c io: add methods to set I/O handlers on AioContext 2017-02-21 11:14:07 +00:00
channel-socket.c sockets: Limit SocketAddressLegacy to external interfaces 2017-05-09 09:14:40 +02:00
channel-tls.c io: add methods to set I/O handlers on AioContext 2017-02-21 11:14:07 +00:00
channel-util.c all: Clean up includes 2016-02-23 12:43:05 +00:00
channel-watch.c io: add methods to set I/O handlers on AioContext 2017-02-21 11:14:07 +00:00
channel-websock.c websock: Don't try to set *errp directly 2017-07-13 13:45:53 +02:00
channel.c io: make qio_channel_yield aware of AioContexts 2017-02-21 11:14:07 +00:00
dns-resolver.c io: preserve ipv4/ipv6 flags when resolving InetSocketAddress 2017-07-14 14:28:29 +01:00
Makefile.objs io: introduce a DNS resolver API 2017-01-23 15:32:46 +00:00
task.c io: fix possible double free of task error object 2017-01-26 10:26:18 +00:00
trace-events io: change the QIOTask callback signature 2017-01-23 15:32:18 +00:00