From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas 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 11:26:28 +0000 Message-ID: References: <87o71b6gmd.fsf@gmail.com> <87y10e4v7d.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="16593"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74907@debbugs.gnu.org, Ship Mints To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 17 12:28:24 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 1tNVkW-00046z-5t for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Dec 2024 12:28:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNVkC-0001ze-AW; Tue, 17 Dec 2024 06:28:04 -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 1tNVkB-0001zS-4n for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2024 06:28: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 1tNVkA-0007Lh-Rs for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2024 06:28:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:MIME-Version:References:In-Reply-To:From:To:Subject; bh=gm0womVss0XDFqGm28ErGo/T2Y5PVr/durVRc69rP5o=; b=iPJ9vgK9Wh4HJTDAknv4CLmC7Bxt3WaOaR+diXWv3Sc0y10N6lkQU4kFGKY718q9p4aTHHECfQ+X2Y9hgxEYU1EzCU1YZdXCIb525ckG9/jWsE2+QPmApS3LaIJ4f7Fc44sHo3T0ARl4u40+1sqPl8gCBCCZphN8reZ7+UITp7oq1Dh5gBwQ4iD9vXlJNVdHuqT95vAK+5USmDAZ1CeETz74L2tyDD39bUni9TH7pVPQcYwLTfFlPY7mDOMhWbpfy/HZ79wOcaS+2WIwRBL/CS5pp5OHlLlhbTQiJWwkDedDD9tlly56ApJMxrP6nKQYz3XChO2OCXPsRGws4tPuFQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNVkA-00022t-6u for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2024 06:28:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Dec 2024 11:28: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.17344348587825 (code B ref 74907); Tue, 17 Dec 2024 11:28:02 +0000 Original-Received: (at 74907) by debbugs.gnu.org; 17 Dec 2024 11:27:38 +0000 Original-Received: from localhost ([127.0.0.1]:57784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNVjl-000228-G5 for submit@debbugs.gnu.org; Tue, 17 Dec 2024 06:27:38 -0500 Original-Received: from mail-ed1-f44.google.com ([209.85.208.44]:61806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNVjj-00021o-4z for 74907@debbugs.gnu.org; Tue, 17 Dec 2024 06:27:36 -0500 Original-Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-5d3d0205bd5so7360775a12.3 for <74907@debbugs.gnu.org>; Tue, 17 Dec 2024 03:27:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734434789; x=1735039589; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=gm0womVss0XDFqGm28ErGo/T2Y5PVr/durVRc69rP5o=; b=arC6qrV0/mXqgfjFysp/E2xU9UMDYKvQyqoqH4HfBO+vVeGrHBRhgRMJwc9Y3Wzve0 aQd2wIMX0E9B8fjuAwn+U8ibLwY8Hn6Ll36rZFa/SrmYfAtxu69/VKzgY504+9zjgu0F FTtZaF1jvTm3/qirB800NP0PaSzFfp0hS7kRNGlXtHPGimioHX2//dLUbn4OcWTyMxH5 nRJAX8Pnt4SpJab+qqQc7S4pqK/v9zSUFpVoG3S5UkqUe9XYRFF7IWk4o6UdFZWiJQn6 UZRrazs44m0J7zCvsgjkp2SHPdlWtMRlyLoh4nLV7l/jTITFamBoZVhabsFfBnE7fjJR mOqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734434789; x=1735039589; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=gm0womVss0XDFqGm28ErGo/T2Y5PVr/durVRc69rP5o=; b=qzvqzZj5ha+GOE8/oRLPaC/tlluSzN9uspx/n7axpVnWIVgb5uHGt5BPj/Q9TjB/T/ iHEMLmXydyzWNcAwDZ0kKqs8yJjKZDo76NjEz6wx+a5EhJkqWwWQtfDTD9c6YnR7RrsL XvrhyzziVYA1NEdvPOUsuhGX7dFifnCM4+mU7po53H5MV5rbqzCf/NTJojClSiqnyHv3 Y196CyprNGvMLBBmsvxxAHvjeDX8tGwBWMqo4WyGZnZQ386jiB0g8AVuT6fEkxETwyRV VPzRgsvELnczX0RqIJSyb5FxHzk48wrK76ZwviAdz/TcJmJKEJssi82jQNetMOmo3rAJ UNzQ== X-Forwarded-Encrypted: i=1; AJvYcCWiLs+b04cOCeY1g9P3WPt6GBYmi7HyXsuJYY95Fvps5By8nSpNgE2MRe9dkKxAVE7DwaRisg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwUHCdhL89qT25+FMdFynrGV05FOgPbxwWKYNJR65+2u5K6NO6Q T/SehdJ77daqOD6lTWvsxT6kcnaeKzGgeL+zkOpSLHVARGGMK2Xmgel43N6pus6rJ70sywipu1x rdj5smFciLO1eE4A9CEu+nkY+/RI= X-Gm-Gg: ASbGncvPXn1YCCM2lmhJSn5m7GIT19nuiz/U6Fo1YhyHqDf7IXAlMdMqMuoqGSfl0AL S91qdR3kj4UA8tbFft0s3go9RWD7YmEIhpBMJ/mA= X-Google-Smtp-Source: AGHT+IGrSBZrZepjtPbUE1UCY/YUZqxM3sxJA5LZ6fnuAx//OKR86taek0ZKwOj89d0YCsh7cT5P4c/PBv36UOoYL1A= X-Received: by 2002:a05:6402:238f:b0:5d6:66cf:2a3a with SMTP id 4fb4d7f45d1cf-5d666cf2a93mr7515743a12.17.1734434789132; Tue, 17 Dec 2024 03:26:29 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 17 Dec 2024 11:26:28 +0000 In-Reply-To: <87y10e4v7d.fsf@gmail.com> 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:297266 Archived-At: Robert Pluim writes: >>>>>> 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? In an interactive session. I tried now in batch too, using this: ./src/emacs -Q -batch -eval '(progn (princ (network-lookup-address-info "localhost")) (terpri) (princ (network-lookup-address-info "127.0.0.1")))' ;; With VPN ([0 0 0 0 0 0 0 1 0] [127 0 0 1 0]) ([127 0 0 1 0]) ;; Without VPN ([0 0 0 0 0 0 0 1 0] [127 0 0 1 0]) ([127 0 0 1 0]) > 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 li= ke > to know which VPN client you=CA=BCre using so I can avoid it =F0=9F=98=80 It didn't work, unfortunately. However, I now see that I made a mistake in my original recipe to reproduce this: I didn't bind 'nsm-trust-local-network'. I can reproduce the backtrace consistently by evaluating this in an interactive session: (let ((nsm-trust-local-network t)) (should (eq t (nsm-should-check "example.org")))) This allowed edebugging this, and I see that the backtrace comes from nsm.el:238, where we do: (substring (nth 3 info) 0 -1) With a VPN, `info` is bound to this when I get the backtrace: ("utun0" [10 0 0 1 0] (0 . [0 0 10 255 255 255 16 2 0 0 10 0 0 1]) (0 . [0 0 255 0 0 0 16 2 0 0 10 0 0 1])) Without a VPN, `info` is bound to this instead: ("utun6" [65153 0 0 0 6123 19123 32345 45123 0] [65153 0 0 0 65535 65535 65535 65535 0] [65535 65535 65535 65535 0 0 0 0 0]) Clearly, this will not work: (substring '(0 . [1 2 3 4]) 0 -1) So the question is why `network-interface-list` would return such an unusual value here.