From: Stefan Kangas <stefankangas@gmail.com>
To: Robert Pluim <rpluim@gmail.com>
Cc: 74907@debbugs.gnu.org, Ship Mints <shipmints@gmail.com>
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 [thread overview]
Message-ID: <CADwFkmmp2V8HVEgO-ZuY0KFzubN-iO4YVa82V0ik8MHbnfw1uw@mail.gmail.com> (raw)
In-Reply-To: <87y10e4v7d.fsf@gmail.com>
Robert Pluim <rpluim@gmail.com> writes:
>>>>>> On Mon, 16 Dec 2024 21:55:33 +0000, Stefan Kangas <stefankangas@gmail.com> said:
>
> Stefan> I don't see a difference there.
>
> Stefan> ;; With VPN
> Stefan> (network-lookup-address-info "localhost")
> Stefan> => ([0 0 0 0 0 0 0 1 0] [127 0 0 1 0])
>
> Stefan> (network-lookup-address-info "127.0.0.1")
> Stefan> => ([127 0 0 1 0])
>
> Stefan> ;; Without VPN
> Stefan> (network-lookup-address-info "localhost")
> Stefan> => ([0 0 0 0 0 0 0 1 0] [127 0 0 1 0])
>
> Stefan> (network-lookup-address-info "127.0.0.1")
> Stefan> => ([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ʼs 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ʼd like
> to know which VPN client youʼre using so I can avoid it 😀
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.
next prev parent reply other threads:[~2024-12-17 11:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-16 2:03 bug#74907: 31.0.50; nsm-check-local-subnet-ipv4 test fails on macOS with VPN enabled Stefan Kangas
2024-12-16 10:56 ` Robert Pluim
2024-12-16 11:23 ` Ship Mints
2024-12-16 11:46 ` Robert Pluim
2024-12-16 21:55 ` Stefan Kangas
2024-12-17 7:36 ` Robert Pluim
2024-12-17 11:26 ` Stefan Kangas [this message]
2024-12-17 12:40 ` Robert Pluim
2024-12-17 12:45 ` Stefan Kangas
2024-12-17 12:57 ` Robert Pluim
2024-12-17 13:11 ` Ship Mints
2024-12-17 13:14 ` Ship Mints
2024-12-17 13:30 ` Robert Pluim
2024-12-18 0:16 ` Stefan Kangas
2024-12-18 16:03 ` Robert Pluim
2024-12-19 15:29 ` Robert Pluim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADwFkmmp2V8HVEgO-ZuY0KFzubN-iO4YVa82V0ik8MHbnfw1uw@mail.gmail.com \
--to=stefankangas@gmail.com \
--cc=74907@debbugs.gnu.org \
--cc=rpluim@gmail.com \
--cc=shipmints@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.