GNU bug report logs - #45798
28.0.50; nsm-check-local-subnet-ipv4 fails with nsm-trust-local-network

Previous Next

Package: emacs;

Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Date: Mon, 11 Jan 2021 19:26:01 UTC

Severity: normal

Tags: fixed

Found in version 28.0.50

Fixed in version 28.1

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Robert Pluim <rpluim <at> gmail.com>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: 45798 <at> 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
"Basil L. Contovounesios" <contovob <at> 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)




This bug report was last modified 4 years and 52 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.