From: "Daniel P. Berrange" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>
Subject: [Qemu-devel] [PULL v1 1/3] io: bind to loopback IP addrs in test suite
Date: Wed, 23 Dec 2015 10:57:55 +0000 [thread overview]
Message-ID: <1450868277-25630-2-git-send-email-berrange@redhat.com> (raw)
In-Reply-To: <1450868277-25630-1-git-send-email-berrange@redhat.com>
The test suite currently binds to 0.0.0.0 or ::, which covers
all interfaces of the machine. It is bad practice for test
suite to open publically accessible ports on a machine, so
switch to use loopback addrs 127.0.0.1 or ::1.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
tests/test-io-channel-socket.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test-io-channel-socket.c b/tests/test-io-channel-socket.c
index 194d043..e76d54c 100644
--- a/tests/test-io-channel-socket.c
+++ b/tests/test-io-channel-socket.c
@@ -261,7 +261,7 @@ static void test_io_channel_ipv4(bool async)
listen_addr->type = SOCKET_ADDRESS_KIND_INET;
listen_addr->u.inet = g_new0(InetSocketAddress, 1);
- listen_addr->u.inet->host = g_strdup("0.0.0.0");
+ listen_addr->u.inet->host = g_strdup("127.0.0.1");
listen_addr->u.inet->port = NULL; /* Auto-select */
connect_addr->type = SOCKET_ADDRESS_KIND_INET;
@@ -295,7 +295,7 @@ static void test_io_channel_ipv6(bool async)
listen_addr->type = SOCKET_ADDRESS_KIND_INET;
listen_addr->u.inet = g_new0(InetSocketAddress, 1);
- listen_addr->u.inet->host = g_strdup("::");
+ listen_addr->u.inet->host = g_strdup("::1");
listen_addr->u.inet->port = NULL; /* Auto-select */
connect_addr->type = SOCKET_ADDRESS_KIND_INET;
--
2.5.0
next prev parent reply other threads:[~2015-12-23 10:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-23 10:57 [Qemu-devel] [PULL v1 0/3] Misc I/O channel fixes Daniel P. Berrange
2015-12-23 10:57 ` Daniel P. Berrange [this message]
2015-12-23 10:57 ` [Qemu-devel] [PULL v1 2/3] io: fix setting of QIO_CHANNEL_FEATURE_FD_PASS on server connections Daniel P. Berrange
2015-12-23 10:57 ` [Qemu-devel] [PULL v1 3/3] io: fix stack allocation when sending of file descriptors Daniel P. Berrange
2015-12-23 13:29 ` [Qemu-devel] [PULL v1 0/3] Misc I/O channel fixes Peter Maydell
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=1450868277-25630-2-git-send-email-berrange@redhat.com \
--to=berrange@redhat.com \
--cc=peter.maydell@linaro.org \
--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).