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.bugs Subject: bug#74907: 31.0.50; nsm-check-local-subnet-ipv4 test fails on macOS with VPN enabled Date: Tue, 17 Dec 2024 08:36:38 +0100 Message-ID: <87y10e4v7d.fsf@gmail.com> References: <87o71b6gmd.fsf@gmail.com> 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="6741"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74907@debbugs.gnu.org, Ship Mints To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 17 08:38:16 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1tNS9o-0001aS-0U for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Dec 2024 08:38:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNS9d-00004z-Rh; Tue, 17 Dec 2024 02:38:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNS9b-0008WP-Uh for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2024 02:38:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNS9b-000490-MO for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2024 02:38:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=J1+nxlc5Bk8+TVR1XtQxWyt8zRCVKRWVtqKoJg5J4fg=; b=ChNNyYFbvRUbJLUm9Dzc9eiGI+td50+leihigbxa6CCCSvb7Aq0dMUqkQEoocQgzskzBsy8GJhw6fp8FS40l/3CPORhA9yd2hxS1lzdyD4JNk4N/RhW8Z8TMPEswegQqfKIxT2hledlHAnXO49jgF2JhZsJ5ehuO0Xb8iBoCROjdryQlV1xsGhMRH3T6skbsZejWLDHeupNjTtKxlUqrd7mq1+L7m/I4scVCUNVQyzOREaglocI18Acgy8fXVNjaqvia3XkccNN4gOQ7k7QVloKYDFAe2WWemz8/Qc8xlVkwNCSb4EL8fzA7CDwXI9j21WJHBRgmteU20x6j89o53w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNS9a-0007pP-Kk for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2024 02:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Dec 2024 07:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74907 X-GNU-PR-Package: emacs Original-Received: via spool by 74907-submit@debbugs.gnu.org id=B74907.173442107730077 (code B ref 74907); Tue, 17 Dec 2024 07:38:02 +0000 Original-Received: (at 74907) by debbugs.gnu.org; 17 Dec 2024 07:37:57 +0000 Original-Received: from localhost ([127.0.0.1]:57342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNS9V-0007p3-Ee for submit@debbugs.gnu.org; Tue, 17 Dec 2024 02:37:57 -0500 Original-Received: from [209.85.128.47] (port=59484 helo=mail-wm1-f47.google.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNS9T-0007ob-1D for 74907@debbugs.gnu.org; Tue, 17 Dec 2024 02:37:55 -0500 Original-Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-436202dd730so35237045e9.2 for <74907@debbugs.gnu.org>; Mon, 16 Dec 2024 23:37:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734421001; x=1735025801; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=J1+nxlc5Bk8+TVR1XtQxWyt8zRCVKRWVtqKoJg5J4fg=; b=OfrLu11muAMx043V/P8EanxzKt2bk7WI4qdKd8hePnO24iUtk1P8BsuKmPGHHbzLb4 FElAvfiou5Ai56wWfJk5Ax9qjHJOQVAA8a5AjuoN6UIf6R5S6r1QWbRWaLAucgOlSElr D/RGTWKZMlBHxkeJ905H2pVQnS3ozhnLWwJ/s7KN52bw7dVpqSu+m6eki5WA7v9frCl2 YBSFjUCGtB1TELqjDHPcjuB9b/M6wKUq1fjo0Ere+Avh0jsCABSWFqvKA1C/ZHGVsdyo jhNuaUXBua4QK6S26I8Jj0csUU0GmeIlCdZfJH3ycJcYpayK/WZ3x+8xhJ/nZPxb7/6v m43A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734421001; x=1735025801; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J1+nxlc5Bk8+TVR1XtQxWyt8zRCVKRWVtqKoJg5J4fg=; b=BUpAysI92Ly23ReJ6xxaP+A02rpc/aYQ9Z+5SkupvwJY/CkU8XklKNXIZmMm7T+U50 1sjExqFx3m3oiivDtKN+ADiZ8AhqSa54du1wfsLbJ2EN+HS/zMG27MHfTPff+EZy9GrJ YfVG9D/vRMJnD4ifGmtb1AnSzLHCw8slYSggVGjEwDXVVwrmAmwOhFiM8V3S6q8HhJr2 f6FTPAQsqRDJk3pLJaIlTGX3gZ0MfbE+0boWV5NGOVfEuoYuB+4lhRYpYkf7NQe9dZVp Zk4PvoCQfDQgvUcdOdQSupOvqlMKYFM6tNDzhpXSKd7uTTxVSbO3mAnK6atzklS8YNDi i4RQ== X-Forwarded-Encrypted: i=1; AJvYcCV2m3/tuMh+PPZ1rJFUSHTK2j8ivRD5rdiXufolML67kwQoXoE/VwO0h0d9AVxQOK8NeyL5Lg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwprGBDhcvyzwW87CiN8nABFzf8KaOCQmJ6cxI+OzSn06pE1/tP Zp5/zkxOLtC07TurBSclWA5RE/8g9y/jvJoSyrY85RD3c4hcvfw40c+N4g== X-Gm-Gg: ASbGnct9nNPlvnxaYGa+e2P0T3iYuAzkjecz3WAT1qTccAcgFGz7ZzQUlMw2ZM9Dwy9 WLmf0ID4B1Hbp5x2JXfK+JsYi7fsaaKtj7Hw/5970iLifrLFccL4927HUMoDw1trN4A+2TG5xVr Ct8kNnV9IZ4dURak454Xq7P/8cBsn9+i+F0Z0k1axlCKYxINwaMTCjHDsE1GE1ujgmol6J2us8I NEU4KdOnSG2dsMdBl6k13wEhqnYFL0sFJQ1oqVLRN8= X-Google-Smtp-Source: AGHT+IH5n4fxrO7+mEz6+lmrh7h/iM34o+8Cnsao8J09yHEA4Qa1gfajVyE9HZ6ewCIcg1fP+1FFMw== X-Received: by 2002:a05:600c:3d0f:b0:434:f609:1afa with SMTP id 5b1f17b1804b1-4362aa34d42mr136569295e9.4.1734421000661; Mon, 16 Dec 2024 23:36:40 -0800 (PST) Original-Received: from rltb ([2a01:e0a:3f3:fb51:a104:d8c:5af4:8136]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4362559ed6csm162701165e9.24.2024.12.16.23.36.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 23:36:40 -0800 (PST) In-Reply-To: (Stefan Kangas's message of "Mon, 16 Dec 2024 21:55:33 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:297255 Archived-At: >>>>> On Mon, 16 Dec 2024 21:55:33 +0000, Stefan Kangas said: Stefan> I don't see a difference there. Stefan> ;; With VPN Stefan> (network-lookup-address-info "localhost") Stefan> =3D> ([0 0 0 0 0 0 0 1 0] [127 0 0 1 0]) Stefan> (network-lookup-address-info "127.0.0.1") Stefan> =3D> ([127 0 0 1 0]) Stefan> ;; Without VPN Stefan> (network-lookup-address-info "localhost") Stefan> =3D> ([0 0 0 0 0 0 0 1 0] [127 0 0 1 0]) Stefan> (network-lookup-address-info "127.0.0.1") Stefan> =3D> ([127 0 0 1 0]) In an interactive session or -batch? Anyway, here=CA=BCs a wild stab in the dark based on the only code path I could see that would give your original output. If that works I=CA=BCd like to know which VPN client you=CA=BCre using so I can avoid it =F0=9F=98=80 diff --git a/src/process.c b/src/process.c index cd1378f07ad..7f14db31c43 100644 --- a/src/process.c +++ b/src/process.c @@ -4764,13 +4764,17 @@ DEFUN ("network-lookup-address-info", Fnetwork_look= up_address_info, { for (lres =3D res; lres; lres =3D lres->ai_next) { -#ifndef AF_INET6 - if (lres->ai_family !=3D AF_INET) - continue; + /* Avoid converting non-IP addresses (Bug#74907). */ + if (lres->ai_family =3D=3D AF_INET +#ifdef AF_INET6 + || lres->ai_family =3D=3D AF_INET6 #endif - addresses =3D Fcons (conv_sockaddr_to_lisp (lres->ai_addr, - lres->ai_addrlen), - addresses); + ) + addresses =3D Fcons (conv_sockaddr_to_lisp (lres->ai_addr, + lres->ai_addrlen), + addresses); + else + continue; } addresses =3D Fnreverse (addresses); =20 Robert --=20