From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WinpW-0001j2-CD for qemu-devel@nongnu.org; Fri, 09 May 2014 12:39:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WinpQ-0005lE-8q for qemu-devel@nongnu.org; Fri, 09 May 2014 12:39:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57614) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WinpQ-0005l4-0j for qemu-devel@nongnu.org; Fri, 09 May 2014 12:39:20 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s49GdI82028498 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 9 May 2014 12:39:18 -0400 From: Amos Kong Date: Sat, 10 May 2014 00:39:13 +0800 Message-Id: <1399653553-5978-1-git-send-email-akong@redhat.com> Subject: [Qemu-devel] [PATCH] spice: return unspecified address according to protocol List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: djasa@redhat.com, kraxel@redhat.com 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 --- 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