From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: ai_flags in calls to getaddrinfo Date: Fri, 01 Jan 2021 14:50:32 +0200 Message-ID: <83r1n4g6sn.fsf@gnu.org> References: <83sg7mggls.fsf@gnu.org> <87zh1sc486.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29857"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 01 13:51:39 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kvJu6-0007Qp-AP for ged-emacs-devel@m.gmane-mx.org; Fri, 01 Jan 2021 13:51:38 +0100 Original-Received: from localhost ([::1]:57624 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kvJu5-0000jA-Bx for ged-emacs-devel@m.gmane-mx.org; Fri, 01 Jan 2021 07:51:37 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvJtJ-0000J8-Rp for emacs-devel@gnu.org; Fri, 01 Jan 2021 07:50:50 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53876) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kvJtJ-0001Y5-K6; Fri, 01 Jan 2021 07:50:49 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1487 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kvJtJ-0002QQ-3S; Fri, 01 Jan 2021 07:50:49 -0500 In-Reply-To: <87zh1sc486.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri, 01 Jan 2021 11:59:37 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:262247 Archived-At: > From: Lars Ingebrigtsen > Cc: emacs-devel@gnu.org > Date: Fri, 01 Jan 2021 11:59:37 +0100 > > I think that when the user asks for ipv6 explicitly, they should get > back ipv6 (or get nothing/a failure). If the user has specified the > protocol, it's presumably because they really want that protocol. But isn't the return value a valid IPv6 address when using AI_V4MAPPED? > If they don't specify the protocol version, they get back either/both > ipv6/ipv4 now (depending on the system), don't they? On that system, I get only the IPv4 address if I don't use AI_ALL and AI_V4MAPPED. If I do use the two flags, I get both IPv4 and IPv6 addresses.