summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorPeter Maydell2015-06-23 19:25:55 +0200
committerPeter Maydell2015-06-23 19:25:55 +0200
commit355df30554445c043a12168e9c5f912742050548 (patch)
tree1b523d3807c70c30d219d48053db0d56c15cd207 /util
parentMerge remote-tracking branch 'remotes/sstabellini/tags/xen-220615-3' into sta... (diff)
parentutil/qemu-sockets: improve ai_flag hints for ipv6 hosts (diff)
downloadqemu-355df30554445c043a12168e9c5f912742050548.tar.gz
qemu-355df30554445c043a12168e9c5f912742050548.tar.xz
qemu-355df30554445c043a12168e9c5f912742050548.zip
Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2015-06-23' into staging
trivial patches for 2015-06-23 # gpg: Signature made Tue Jun 23 18:23:45 2015 BST using RSA key ID A4C3D7DB # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" * remotes/mjt/tags/pull-trivial-patches-2015-06-23: (21 commits) util/qemu-sockets: improve ai_flag hints for ipv6 hosts hw/display/tcx.c: Fix memory leak hw/display/cg3.c: Fix memory leak Makefile: Add "make ctags" Makefile: Fix "make cscope TAGS" qemu-options: Use @itemx where appropriate qemu-options: Improve -global documentation throttle: Fix typo in the documentation of block_set_io_throttle hw/display/qxl-logger.c: Constify some variable configure: rearrange --help and consolidate enable/disable together libcacard: pkgconfig: tidy dependent libs vt82c686: QOMify xen_pt: QOMify wdt_i6300esb: QOMify piix4: QOMify piix: piix3 QOMify pci-assign: QOMify Print error when failing to load PCI config data Grammar: 'as to'->'as for' remove libdecnumber/dpd/decimal128Local.h ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util')
-rw-r--r--util/qemu-sockets.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index 4026314435..2add83a0fc 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -29,6 +29,9 @@
#ifndef AI_ADDRCONFIG
# define AI_ADDRCONFIG 0
#endif
+#ifndef AI_V4MAPPED
+# define AI_V4MAPPED 0
+#endif
/* used temporarily until all users are converted to QemuOpts */
QemuOptsList socket_optslist = {
@@ -118,7 +121,7 @@ int inet_listen_opts(QemuOpts *opts, int port_offset, Error **errp)
int slisten, rc, to, port_min, port_max, p;
memset(&ai,0, sizeof(ai));
- ai.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
+ ai.ai_flags = AI_PASSIVE;
ai.ai_family = PF_UNSPEC;
ai.ai_socktype = SOCK_STREAM;
@@ -335,7 +338,7 @@ static struct addrinfo *inet_parse_connect_opts(QemuOpts *opts, Error **errp)
memset(&ai, 0, sizeof(ai));
- ai.ai_flags = AI_CANONNAME | AI_ADDRCONFIG;
+ ai.ai_flags = AI_CANONNAME | AI_V4MAPPED | AI_ADDRCONFIG;
ai.ai_family = PF_UNSPEC;
ai.ai_socktype = SOCK_STREAM;
@@ -435,7 +438,7 @@ int inet_dgram_opts(QemuOpts *opts, Error **errp)
/* lookup peer addr */
memset(&ai,0, sizeof(ai));
- ai.ai_flags = AI_CANONNAME | AI_ADDRCONFIG;
+ ai.ai_flags = AI_CANONNAME | AI_V4MAPPED | AI_ADDRCONFIG;
ai.ai_family = PF_UNSPEC;
ai.ai_socktype = SOCK_DGRAM;