From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: ai_flags in calls to getaddrinfo, broader call for reproducibility check Date: Mon, 11 Jan 2021 18:53:51 +0100 Message-ID: <87ft374axc.fsf@gmail.com> References: <83sg7mggls.fsf@gnu.org> <83czymc8nq.fsf@gnu.org> <74b7a0a9-0eb3-7944-19d2-f72424ee72d7@dasyatidae.com> <83eeirfqbo.fsf@gnu.org> <87o8hvscfi.fsf@gmail.com> <8335z7fmnz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8629"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: Robin Tarsiger Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 11 18:55:21 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 1kz1PV-00028u-7D for ged-emacs-devel@m.gmane-mx.org; Mon, 11 Jan 2021 18:55:21 +0100 Original-Received: from localhost ([::1]:55522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kz1PU-0005X4-8F for ged-emacs-devel@m.gmane-mx.org; Mon, 11 Jan 2021 12:55:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kz1OB-0004gP-EY for emacs-devel@gnu.org; Mon, 11 Jan 2021 12:53:59 -0500 Original-Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:41747) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kz1O7-0005rg-9x; Mon, 11 Jan 2021 12:53:59 -0500 Original-Received: by mail-wr1-x42b.google.com with SMTP id a12so669742wrv.8; Mon, 11 Jan 2021 09:53:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=JG5wSmrhrkUZ1XaD5QXsCG5ctO/mxW88H+b/ytGQocs=; b=DWrtHG2gTwhhh6gpFFckQdkXaprI/+py/0WXI652JKaXZhgd8eAZ7pMPymaSyrx0qJ 0+IKrweYJViZ/rvYjuxZjCCQm3kIxld1tSGLskClYHA05T8apid0fG7oLrVzdcwqJCWI va8nCtnBidW1LlklW0kVjTX86eJWpPuikx+TFCb5M7RqEUBvTnE6rY6I1bKfFazftAKo jrEstGC5MUcw9a+5ngR4XA7kcftx9/u4Vf1R0nAhsMYMpw/XFQjLR4ThuKoT/KtbQVok zhGaGoGzCpYU25TnVOgca1zWTSWGkOqsuWYi8ZylMJFEL5bwWtIheeUmnnBHXCe++IG1 Fngw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=JG5wSmrhrkUZ1XaD5QXsCG5ctO/mxW88H+b/ytGQocs=; b=TMWzWVF/uHHnL+DT2jN2YOvR7Ke0cWu+wc40igqU+eY9UX16FNH419LzZJkG74XSkt 4O5SFdw23s1S7YwLhQXuz8IDC+K3+lmRDUTN9ijP9So60QuyOthwkNNIlVv/rQ0MWvFL YgXWLx0RSGpdmBzOiGayik/x9bGlZ5Ki7ktwYFXo4993yVQDJ+4jiT1e7SdvuAME6eU/ Ovpct2Agupm5pCWYHcibKHBldOv+RKOWgKUpnkCCYsp0o2HQd4SuleVpMURgUhFjWZsa GmU38wjH7DGDm5389k73WZYc0nYDXMu7RLQOQ7nyYkCzez+WoJD2mIXI6YAZlbSnIOcr Gfjw== X-Gm-Message-State: AOAM533EBJXKJsW0jXbHwHrSgDXWA1LEszGPFP2JB5ZlIxcMzqZhKuxI DrP4/C3EeF0LEQLuxXnebSnmdnAJ9Tw= X-Google-Smtp-Source: ABdhPJwy2rKWrWFX6VkAxyBDe1OgaMV/BGJ7xP3lMxqt0zARSquG3aGMBt0mZro8xb8DkHwVy0tvbg== X-Received: by 2002:a5d:464b:: with SMTP id j11mr267864wrs.227.1610387632544; Mon, 11 Jan 2021 09:53:52 -0800 (PST) Original-Received: from rltb ([2a01:e34:ecfc:a861:69b6:6aaf:dbd3:8964]) by smtp.gmail.com with ESMTPSA id c190sm69875wme.19.2021.01.11.09.53.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 09:53:51 -0800 (PST) In-Reply-To: (Robin Tarsiger's message of "Mon, 11 Jan 2021 11:07:33 -0600") Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=rpluim@gmail.com; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:262924 Archived-At: Robin Tarsiger writes: > Eli Zaretskii wrote: >> Is it possible to check this via network-interface-list, and avoid the >> test with IPv6 if that is bound to fail? > > The relevant part of the tests should, generally, be about DNS _lookups_ > of IPv6 addresses. This is not "truly" related to whether your local host > has IPv6 connectivity at the network layer. I have no IPv6 routing at > home currently, but getaddrinfo will still give me all the IPv6 results > I want; I just won't be able to connect there. I expect that case to be > common. The opposite case, where I could have IPv6 networking available > but have restrictive upstream DNS resolvers blocking queries for or resul= ts > containing IPv6 addresses, is also theoretically possible, though I would > expect it to be rare. > Yes. DNS lookups is the bit that generally works without intervention. > So basically you'd be testing the wrong thing. You could try to err on the > side of caution, but then you'd be excluding the test in a lot of cases > that really should work. > > If your upstream resolvers default to mangling or blocking AAAA queries, = as > my current best hypothesis suggests, this is not something an application > can reasonably take responsibility for fixing up, and we'd want to go the > route of "skip network-environment-dependent tests when on hosts that are > in strange/broken network environments". I don't know whether there's an > existing toggle for that; if not, then that would be the thing to put in > (at whatever granularity seems appropriate). > > There is no _reliable_ way I know of to determine this programmatically, > certainly not without sending some probe queries with a high level of > specific control over them, and I expect that would be a rather hairy > thing to do just for a few tests, and not reasonably maintainable. > (require 'dns) (skip-unless (dns-query "google.com" 'AAAA)) and then do the network-lookup-address-info tests (although on Windows this depends on DNS over TCP working, and either /etc/resolv.conf or a working nslookup). Eli? > Another perspective on above is that when you mention "behind firewalls up > the kazoo", what my intuition imagines is something like: corporate DNS > filtering which only allows specific request types and either was never > updated to think of AAAA queries as valid, or is operated in a way assumi= ng > that users will never have a legitimate need for them (because they "won't > be able to use" the results), or does this as a workaround for some broken > behavior elsewhere (such as some other device used in the organization > which will prefer an IPv6 address response even when it's not reachable, > and fail to fall back to IPv4?) or... any number of things like that. > I=CA=BCd love to be able to persuade Eli's network admins to fix such things, but I only attempt things that have a reasonable chance of success (and such things are sometimes dependent on vendors rather than admins). Robert