* [Qemu-devel] [PATCH] spice: return unspecified address according to protocol
@ 2014-05-09 16:39 Amos Kong
2014-05-12 9:34 ` Gerd Hoffmann
0 siblings, 1 reply; 4+ messages in thread
From: Amos Kong @ 2014-05-09 16:39 UTC (permalink / raw)
To: qemu-devel; +Cc: djasa, kraxel
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] spice: return unspecified address according to protocol
2014-05-09 16:39 [Qemu-devel] [PATCH] spice: return unspecified address according to protocol Amos Kong
@ 2014-05-12 9:34 ` Gerd Hoffmann
2014-05-12 10:06 ` Amos Kong
0 siblings, 1 reply; 4+ messages in thread
From: Gerd Hoffmann @ 2014-05-12 9:34 UTC (permalink / raw)
To: Amos Kong; +Cc: djasa, qemu-devel
Hi,
> 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"));
"ipv6" means "force ipv6". If the option is not present spice-server
might still listen on ipv6, and qemu can't easily figure whenever that
is the case or not.
cheers,
Gerd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] spice: return unspecified address according to protocol
2014-05-12 9:34 ` Gerd Hoffmann
@ 2014-05-12 10:06 ` Amos Kong
2014-05-12 12:38 ` Markus Armbruster
0 siblings, 1 reply; 4+ messages in thread
From: Amos Kong @ 2014-05-12 10:06 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: djasa, qemu-devel
On Mon, May 12, 2014 at 11:34:18AM +0200, Gerd Hoffmann wrote:
> Hi,
>
> > 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"));
>
> "ipv6" means "force ipv6". If the option is not present spice-server
> might still listen on ipv6, and qemu can't easily figure whenever that
> is the case or not.
OK. And management will not use this returned address, so it's
not a serious issue.
Thanks. NAK this patch.
> cheers,
> Gerd
>
>
--
Amos.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] spice: return unspecified address according to protocol
2014-05-12 10:06 ` Amos Kong
@ 2014-05-12 12:38 ` Markus Armbruster
0 siblings, 0 replies; 4+ messages in thread
From: Markus Armbruster @ 2014-05-12 12:38 UTC (permalink / raw)
To: Amos Kong; +Cc: djasa, Gerd Hoffmann, qemu-devel
Amos Kong <akong@redhat.com> writes:
> On Mon, May 12, 2014 at 11:34:18AM +0200, Gerd Hoffmann wrote:
>> Hi,
>>
>> > 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"));
>>
>> "ipv6" means "force ipv6". If the option is not present spice-server
>> might still listen on ipv6, and qemu can't easily figure whenever that
>> is the case or not.
>
> OK. And management will not use this returned address, so it's
> not a serious issue.
>
> Thanks. NAK this patch.
Thanks for trying, Amos. The "*" is ugly... but I have no better ideas,
either.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-05-12 12:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-09 16:39 [Qemu-devel] [PATCH] spice: return unspecified address according to protocol Amos Kong
2014-05-12 9:34 ` Gerd Hoffmann
2014-05-12 10:06 ` Amos Kong
2014-05-12 12:38 ` Markus Armbruster
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).