unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: "Basil L. Contovounesios" <contovob@tcd.ie>
Cc: 45798@debbugs.gnu.org
Subject: bug#45798: 28.0.50; nsm-check-local-subnet-ipv4 fails with nsm-trust-local-network
Date: Tue, 12 Jan 2021 10:34:36 +0100	[thread overview]
Message-ID: <87turm1osz.fsf@gmail.com> (raw)
In-Reply-To: <87lfczt6ti.fsf@tcd.ie> (Basil L. Contovounesios's message of "Mon, 11 Jan 2021 23:03:21 +0000")

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> Oops, sorry!  I must have been looking at the wrong value.  There are
> two cases where nsm-network-same-subnet returns non-nil, and in both
> cases:
>
>   addresses:
>   ([10752 5200 16395 3073 0 0 0 139 0]
>    [10752 5200 16395 3073 0 0 0 113 0]
>    [10752 5200 16395 3073 0 0 0 138 0]
>    [10752 5200 16395 3073 0 0 0 100 0]
>    [74 125 193 139 0] [74 125 193 101 0]
>    [74 125 193 102 0] [74 125 193 138 0]
>    [74 125 193 100 0] [74 125 193 113 0])
>
>   network-interface-list:
>   ((wlp3s0 [65152 0 0 0 38609 2370 19874 38730 0]
>            [65152 0 0 0 65535 65535 65535 65535 0]
>            [65535 65535 65535 65535 0 0 0 0 0])
>    (wlp3s0 [10754 32900 8418 50048 62480 33512 14881 61151 0]
>            [10754 32900 8418 50048 65535 65535 65535 65535 0]
>            [65535 65535 65535 65535 0 0 0 0 0])
>    (lo [0 0 0 0 0 0 0 1 0] [0 0 0 0 0 0 0 1 0]
>        [65535 65535 65535 65535 65535 65535 65535 65535 0])
>    (wlp3s0 [192 168 0 144 0] [192 168 0 255 0] [255 255 255 0 0])
>    (lo [127 0 0 1 0] [127 255 255 255 0] [255 0 0 0 0]))
>
>   info:
>   (lo [0 0 0 0 0 0 0 1 0] [0 0 0 0 0 0 0 1 0]
>       [65535 65535 65535 65535 65535 65535 65535 65535 0])
>
> The only difference is in 'ip':
>
>   1. [10752 5200 16395 3073 0 0 0 139 0]
>   2. [10752 5200 16395 3073 0 0 0 113 0]

What idiot wrote this code? Try this patch:

diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el
index 3f3e713371..0ce65a35ea 100644
--- a/lisp/net/nsm.el
+++ b/lisp/net/nsm.el
@@ -239,7 +239,7 @@ nsm-should-check
         (mapc
          (lambda (info)
            (let ((local-ip (nth 1 info))
-                 (mask (nth 2 info)))
+                 (mask (nth 3 info)))
              (when
                  (nsm-network-same-subnet (substring local-ip 0 -1)
                                           (substring mask 0 -1)





  reply	other threads:[~2021-01-12  9:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 19:24 bug#45798: 28.0.50; nsm-check-local-subnet-ipv4 fails with nsm-trust-local-network Basil L. Contovounesios
2021-01-11 20:33 ` Robert Pluim
2021-01-11 23:03   ` Basil L. Contovounesios
2021-01-12  9:34     ` Robert Pluim [this message]
2021-01-12 15:09       ` Basil L. Contovounesios
2021-01-12 17:56         ` Robert Pluim
2021-03-30 15:04 ` John Paul Adrian Glaubitz
     [not found] <e0036b07-7418-39c6-726d-019264b8734c@physik.fu-berlin.de>
2021-03-30 15:16 ` Robert Pluim
2021-03-30 15:18   ` John Paul Adrian Glaubitz
     [not found]   ` <97d1ac99-3f72-0706-6d1d-3e7bfa7c5763@physik.fu-berlin.de>
2021-03-30 15:34     ` 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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87turm1osz.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=45798@debbugs.gnu.org \
    --cc=contovob@tcd.ie \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).