All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Fam Zheng" <fam@euphon.net>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [Qemu-devel] [PATCH 4/4] qemu-sockets: do not require configured ipv4/ipv6 address
Date: Fri, 24 May 2019 01:40:11 +0200	[thread overview]
Message-ID: <20190523234011.583-5-marcandre.lureau@redhat.com> (raw)
In-Reply-To: <20190523234011.583-1-marcandre.lureau@redhat.com>

podman containers without network don't have ipv4/ipv6 addresses other
than loopback address. However, some of our tests require
getaddrinfo("127.0.0.1") to succeed.

Alternatively, we may want to treat 127.0.0.1 as a special case, to
keep the AI_ADDRCONFIG convenience.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 util/qemu-sockets.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index 8850a280a8..f9c1392a05 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -31,10 +31,6 @@
 #include "qapi/qobject-output-visitor.h"
 #include "qemu/cutils.h"
 
-#ifndef AI_ADDRCONFIG
-# define AI_ADDRCONFIG 0
-#endif
-
 #ifndef AI_V4MAPPED
 # define AI_V4MAPPED 0
 #endif
@@ -385,7 +381,7 @@ static struct addrinfo *inet_parse_connect_saddr(InetSocketAddress *saddr,
 
     memset(&ai, 0, sizeof(ai));
 
-    ai.ai_flags = AI_CANONNAME | AI_ADDRCONFIG;
+    ai.ai_flags = AI_CANONNAME;
     if (atomic_read(&useV4Mapped)) {
         ai.ai_flags |= AI_V4MAPPED;
     }
@@ -472,7 +468,7 @@ static int inet_dgram_saddr(InetSocketAddress *sraddr,
 
     /* lookup peer addr */
     memset(&ai,0, sizeof(ai));
-    ai.ai_flags = AI_CANONNAME | AI_V4MAPPED | AI_ADDRCONFIG;
+    ai.ai_flags = AI_CANONNAME | AI_V4MAPPED;
     ai.ai_family = inet_ai_family_from_address(sraddr, &err);
     ai.ai_socktype = SOCK_DGRAM;
 
-- 
2.22.0.rc1.1.g079e7d2849.dirty



  parent reply	other threads:[~2019-05-23 23:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23 23:40 [Qemu-devel] [PATCH 0/4] tests/docker: add podman support Marc-André Lureau
2019-05-23 23:40 ` [Qemu-devel] [PATCH 1/4] docker.py: " Marc-André Lureau
2019-05-23 23:40 ` [Qemu-devel] [PATCH 2/4] tests/docker: " Marc-André Lureau
2019-05-23 23:40 ` [Qemu-devel] [PATCH 3/4] docker: update fedora to f30 Marc-André Lureau
2019-05-24  7:41   ` Philippe Mathieu-Daudé
2019-05-24 11:17     ` Marc-André Lureau
2019-05-28 15:31       ` Philippe Mathieu-Daudé
2019-05-30  9:51       ` Alex Bennée
2019-06-05 15:10       ` Daniel P. Berrangé
2019-06-05 15:39         ` Philippe Mathieu-Daudé
2019-05-23 23:40 ` Marc-André Lureau [this message]
2019-06-05 15:06   ` [Qemu-devel] [PATCH 4/4] qemu-sockets: do not require configured ipv4/ipv6 address Daniel P. Berrangé
2019-05-24  4:43 ` [Qemu-devel] [PATCH 0/4] tests/docker: add podman support Gerd Hoffmann

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=20190523234011.583-5-marcandre.lureau@redhat.com \
    --to=marcandre.lureau@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=fam@euphon.net \
    --cc=kraxel@redhat.com \
    --cc=philmd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.