qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Amos Kong <akong@redhat.com>
To: aliguori@us.ibm.com, kvm@vger.kernel.org, quintela@redhat.com,
	jasowang@redhat.com, qemu-devel@nongnu.org, laine@redhat.com,
	akong@redhat.com
Subject: [Qemu-devel] [PATCH 4/4] net: support to include ipv6 address by brackets
Date: Fri, 10 Feb 2012 14:27:28 +0800	[thread overview]
Message-ID: <20120210062728.13397.43578.stgit@dhcp-8-167.nay.redhat.com> (raw)
In-Reply-To: <20120210062608.13397.43361.stgit@dhcp-8-167.nay.redhat.com>

That method of representing an IPv6 address with a port is
discouraged because of its ambiguity. Referencing to RFC5952,
the recommended format is:

     [2312::8274]:5200

test status: Successed
listen side: qemu-kvm .... -incoming tcp:[2312::8274]:5200
client side: qemu-kvm ...
             (qemu) migrate -d tcp:[2312::8274]:5200

Signed-off-by: Amos Kong <akong@redhat.com>
---
 net.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/net.c b/net.c
index 9e1ef9e..cccdb6b 100644
--- a/net.c
+++ b/net.c
@@ -88,6 +88,12 @@ static int get_str_sep(char *buf, int buf_size, const char **pp, int sep)
     if (!p1)
         return -1;
     len = p1 - p;
+    /* remove brackets which includes hostname */
+    if (*p == '[' && *(p1-1) == ']') {
+        p += 1;
+        len -= 2;
+    }
+
     p1++;
     if (buf_size > 0) {
         if (len > buf_size - 1)

  parent reply	other threads:[~2012-02-10  6:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-10  6:26 [Qemu-devel] [PATCH 0/4] support to migrate with IPv6 address Amos Kong
2012-02-10  6:27 ` [Qemu-devel] [PATCH 1/4] Use getaddrinfo for migration Amos Kong
2012-02-24  9:08   ` Kevin Wolf
2012-03-02  3:33     ` Amos Kong
2012-03-02 10:28       ` Kevin Wolf
2012-02-24  9:34   ` Kevin Wolf
2012-03-02  2:50     ` Amos Kong
2012-03-02 10:21       ` Kevin Wolf
2012-03-02 10:25       ` [Qemu-devel] " Michael Tokarev
2012-03-02 10:41         ` Daniel P. Berrange
2012-03-05  8:03           ` Amos Kong
2012-02-10  6:27 ` [Qemu-devel] [PATCH 2/4] net/socket: allow ipv6 for net_socket_listen_init and socket_connect_init Amos Kong
2012-02-24  9:25   ` Kevin Wolf
2012-02-10  6:27 ` [Qemu-devel] [PATCH 3/4] net: split hostname and service by last colon Amos Kong
2012-02-24  9:29   ` Kevin Wolf
2012-03-02  3:38     ` Amos Kong
2012-03-02  9:58       ` Amos Kong
2012-03-02 10:35         ` Kevin Wolf
2012-03-02 19:54           ` Laine Stump
2012-03-05  8:57             ` Kevin Wolf
2012-03-05  8:59               ` Amos Kong
2012-03-05  9:06                 ` Kevin Wolf
2012-02-10  6:27 ` Amos Kong [this message]
2012-02-24  9:40 ` [Qemu-devel] [PATCH 0/4] support to migrate with IPv6 address Kevin Wolf

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=20120210062728.13397.43578.stgit@dhcp-8-167.nay.redhat.com \
    --to=akong@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=laine@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /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).