From: Amos Kong <akong@redhat.com>
To: qemu-devel@nongnu.org
Cc: djasa@redhat.com, kraxel@redhat.com
Subject: [Qemu-devel] [PATCH] spice: return unspecified address according to protocol
Date: Sat, 10 May 2014 00:39:13 +0800 [thread overview]
Message-ID: <1399653553-5978-1-git-send-email-akong@redhat.com> (raw)
Commit 4f60af9a changed '0.0.0.0' to '*' to indicate unspecified
address.
"::" is used to indicate unspecified address in IPV6.
This patch returns different address for different protocol,
it's more meaningful for the protocol specification than returning '*'.
Signed-off-by: Amos Kong <akong@redhat.com>
---
ui/spice-core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ui/spice-core.c b/ui/spice-core.c
index d10818a..929c405 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -533,7 +533,9 @@ SpiceInfo *qmp_query_spice(Error **errp)
info->auth = g_strdup(auth);
info->has_host = true;
- info->host = g_strdup(addr ? addr : "*");
+ info->host = g_strdup(addr ? addr : (qemu_opt_get_bool(opts,
+ "ipv6", 0)
+ ? "::" : "0.0.0.0"));
info->has_compiled_version = true;
major = (SPICE_SERVER_VERSION & 0xff0000) >> 16;
--
1.9.0
next reply other threads:[~2014-05-09 16:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-09 16:39 Amos Kong [this message]
2014-05-12 9:34 ` [Qemu-devel] [PATCH] spice: return unspecified address according to protocol Gerd Hoffmann
2014-05-12 10:06 ` Amos Kong
2014-05-12 12:38 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1399653553-5978-1-git-send-email-akong@redhat.com \
--to=akong@redhat.com \
--cc=djasa@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).