From nobody Mon Nov 10 20:53:17 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1558655085; cv=none; d=zoho.com; s=zohoarc; b=BEfoB120ZknRNihhKUwaJVlhdNgT4sVvlasQDe6weIdzIO6F++H95mwLrkZUSdgepnxZZOB9WfsyFBuyxGTYd/PBLe0VjloZi+iSoFnj5PbjxtVrCP8R/Eqm4VtFcUm39LHrSIiziYoEIik/hiuNi/BrrhzvEzrCJO7TAmjVXx4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558655085; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=+yRMG14kymp07otZeRfaRzWUHNfF7rdx1eXBmcTWdXw=; b=IBvW1vB9ELrNbHDBvOq8RsFXK5VWbkcq1CMXRhadoCIW7N1qytREJC31IRzgevz9FjRqZllPDz5qMZQ2hSurgPTg4wx+kTufPSl2NyuWUnmfWBy2tKw7PEDwXBE1MYu8UlUTfhpz/HTGn9+3lWL6S0MNR/uKnxFXzKLl6E/mGTE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1558655085569978.6007610406333; Thu, 23 May 2019 16:44:45 -0700 (PDT) Received: from localhost ([127.0.0.1]:44692 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTxNy-0001A6-87 for importer@patchew.org; Thu, 23 May 2019 19:44:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTxKZ-0007TG-7a for qemu-devel@nongnu.org; Thu, 23 May 2019 19:41:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTxKY-0003e5-67 for qemu-devel@nongnu.org; Thu, 23 May 2019 19:41:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33328) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hTxKY-0003dQ-16 for qemu-devel@nongnu.org; Thu, 23 May 2019 19:41:02 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 46184772DD; Thu, 23 May 2019 23:40:48 +0000 (UTC) Received: from localhost (ovpn-112-51.ams2.redhat.com [10.36.112.51]) by smtp.corp.redhat.com (Postfix) with ESMTP id 53A2E600C4; Thu, 23 May 2019 23:40:40 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Fri, 24 May 2019 01:40:11 +0200 Message-Id: <20190523234011.583-5-marcandre.lureau@redhat.com> In-Reply-To: <20190523234011.583-1-marcandre.lureau@redhat.com> References: <20190523234011.583-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 23 May 2019 23:40:48 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 4/4] qemu-sockets: do not require configured ipv4/ipv6 address X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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=C3=A9 Lureau --- 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" =20 -#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(InetSo= cketAddress *saddr, =20 memset(&ai, 0, sizeof(ai)); =20 - ai.ai_flags =3D AI_CANONNAME | AI_ADDRCONFIG; + ai.ai_flags =3D AI_CANONNAME; if (atomic_read(&useV4Mapped)) { ai.ai_flags |=3D AI_V4MAPPED; } @@ -472,7 +468,7 @@ static int inet_dgram_saddr(InetSocketAddress *sraddr, =20 /* lookup peer addr */ memset(&ai,0, sizeof(ai)); - ai.ai_flags =3D AI_CANONNAME | AI_V4MAPPED | AI_ADDRCONFIG; + ai.ai_flags =3D AI_CANONNAME | AI_V4MAPPED; ai.ai_family =3D inet_ai_family_from_address(sraddr, &err); ai.ai_socktype =3D SOCK_DGRAM; =20 --=20 2.22.0.rc1.1.g079e7d2849.dirty