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 12:45:26 +0000 [thread overview]
Message-ID: <CADwFkmnw8hZ2nK6HaLMcGBfHm4kbceUVfGB_bW8F8TvUuwX3DQ@mail.gmail.com> (raw)
In-Reply-To: <87h6724h5p.fsf@gmail.com>
Robert Pluim <rpluim@gmail.com> writes:
>>>>>> On Tue, 17 Dec 2024 11:26:28 +0000, Stefan Kangas <stefankangas@gmail.com> said:
>
> Stefan> (substring (nth 3 info) 0 -1)
>
> Stefan> With a VPN, `info` is bound to this when I get the backtrace:
>
> Stefan> ("utun0"
> Stefan> [10 0 0 1 0]
> Stefan> (0 . [0 0 10 255 255 255 16 2 0 0 10 0 0 1])
> Stefan> (0 . [0 0 255 0 0 0 16 2 0 0 10 0 0 1]))
>
> Stefan> Without a VPN, `info` is bound to this instead:
>
> Stefan> ("utun6"
> Stefan> [65153 0 0 0 6123 19123 32345 45123 0]
> Stefan> [65153 0 0 0 65535 65535 65535 65535 0]
> Stefan> [65535 65535 65535 65535 0 0 0 0 0])
>
> Stefan> Clearly, this will not work:
>
> Stefan> (substring '(0 . [1 2 3 4]) 0 -1)
>
> Stefan> So the question is why `network-interface-list` would return such an
> Stefan> unusual value here.
>
> Because getifaddrs is returning bogus info for the netmask. How about this:
>
> diff --git a/src/process.c b/src/process.c
> index cd1378f07ad..4fe16ad1a85 100644
> --- a/src/process.c
> +++ b/src/process.c
> @@ -4351,6 +4351,7 @@ network_interface_list (bool full, unsigned short match)
>
> if (full)
> {
> + it->ifa_netmask->sa_family = it->ifa_addr->sa_family;
> elt = Fcons (conv_sockaddr_to_lisp (it->ifa_netmask, len), elt);
> /* There is an it->ifa_broadaddr field, but its contents are
> unreliable, so always calculate the broadcast address from
Thanks, that fixes the issue. Tested with and without VPN on macOS.
next prev parent reply other threads:[~2024-12-17 12:45 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
2024-12-17 12:40 ` Robert Pluim
2024-12-17 12:45 ` Stefan Kangas [this message]
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=CADwFkmnw8hZ2nK6HaLMcGBfHm4kbceUVfGB_bW8F8TvUuwX3DQ@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.