From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#45798: 28.0.50; nsm-check-local-subnet-ipv4 fails with nsm-trust-local-network Date: Mon, 11 Jan 2021 23:03:21 +0000 Message-ID: <87lfczt6ti.fsf@tcd.ie> References: <875z43wa2o.fsf@tcd.ie> <87mtxf2oy6.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="12286"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 45798@debbugs.gnu.org To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 12 00:04:41 2021 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 1kz6Eq-00033H-S3 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Jan 2021 00:04:40 +0100 Original-Received: from localhost ([::1]:41054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kz6Ep-0002ar-Cc for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Jan 2021 18:04:39 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kz6EF-0002ak-1V for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2021 18:04:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47139) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kz6EE-00059t-P7 for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2021 18:04:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kz6ED-0002wj-L7 for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2021 18:04:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Jan 2021 23:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45798 X-GNU-PR-Package: emacs Original-Received: via spool by 45798-submit@debbugs.gnu.org id=B45798.161040621211275 (code B ref 45798); Mon, 11 Jan 2021 23:04:01 +0000 Original-Received: (at 45798) by debbugs.gnu.org; 11 Jan 2021 23:03:32 +0000 Original-Received: from localhost ([127.0.0.1]:58685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kz6Dk-0002vm-BC for submit@debbugs.gnu.org; Mon, 11 Jan 2021 18:03:32 -0500 Original-Received: from mail-wr1-f47.google.com ([209.85.221.47]:45518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kz6Dh-0002vQ-VE for 45798@debbugs.gnu.org; Mon, 11 Jan 2021 18:03:31 -0500 Original-Received: by mail-wr1-f47.google.com with SMTP id d26so450651wrb.12 for <45798@debbugs.gnu.org>; Mon, 11 Jan 2021 15:03:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=NV9D/D6iRMd87BRNLj8lJzBUHgrcZWljAOpdMoOmt5M=; b=NO48zUF05fHcAiWofnsPYs94lC5YqALB1AIcGbqGyN+WX7LbbTHAMnIM8WlYZSXdcn D5qxLhu6FZSpIc4e1B9SfMEUr/I+D6Yhu5OxprYQxMnhBzHFyJpoAasdkrlJtqQppHod U0b2Q6WDDCf8VDD0UotINOTNDYHm8a5UPP1Bkx36jUpcSTeghZtmVaWbUTxdx/3ExLPK 0vU7RI2zoxjisJYSTwwVJ7Azy/vE6oZjMRQ+hJ9wc68nQUhg5fsGLFBrU6rceTXCur2y TawMqEfp3qmr3pkFDGdlOSFMc9ZVHa0RX42NkcOcpLOPKy+r9G+WiuoKrV8aGG0N4ntq A2Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=NV9D/D6iRMd87BRNLj8lJzBUHgrcZWljAOpdMoOmt5M=; b=Cezyrwg7S+qn+ZBJBJoHNVYt4NQBduVVcve6EnXQRC+yibHtgZvB6u3VWgbbr0RuIi ERfvZj//Bag4zk/v7t1nwGpt6NYCKYxb6tgj6615DmfNZSh1wWw90dFj2HuX2lUpP9fk 96vjZubz1qRyRpRdeMsXI+OdnzOLKySjFfJLomYdcrbgFAqDzFyNvGkRG8eO3wSi5Cxu 03KiSTxipI7tnRSzuw0uxBl6ZH5PbMiCUI7CTtvMXlMOX4Pc7ympxCyxL4FbyrkuPjeA STD7h4ReR+yL5h5tEnNXPEJXc5+2tOAHjlxLsKjZhdY1u7kRncwABHLCNGcx7WEEGHfW YUkw== X-Gm-Message-State: AOAM533GybxomWc6GQNu7bPO/FkKNrb6Ifgyy0Qigcolc3hOrvgh39HB oJwFvwgu3CytvdD0TLDQKhd+qw== X-Google-Smtp-Source: ABdhPJyYmfTe9iw3MD9l24g6ZRxyEiAMKgCmerCRQyyjPBYJ64mCT15pB/MHsZyptDlfRYCzdxHXrg== X-Received: by 2002:adf:aad3:: with SMTP id i19mr1204280wrc.119.1610406203875; Mon, 11 Jan 2021 15:03:23 -0800 (PST) Original-Received: from localhost ([2a02:8084:20e2:c380:f410:82e8:3a21:eedf]) by smtp.gmail.com with ESMTPSA id s133sm986593wmf.38.2021.01.11.15.03.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 15:03:22 -0800 (PST) In-Reply-To: <87mtxf2oy6.fsf@gmail.com> (Robert Pluim's message of "Mon, 11 Jan 2021 21:33:53 +0100") 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" Xref: news.gmane.io gmane.emacs.bugs:197760 Archived-At: Robert Pluim writes: > "Basil L. Contovounesios" writes: > >> I stepped through nsm-should-check a bit, but I don't understand what is >> or should be happening. The test fails when local var off-net is set to >> nil, which happens when nsm-network-same-subnet returns non-nil. This >> happens with the following local var values: >> >> ip: [0 0 0 0 0 0 0 1 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]) >> >> addresses: ([0 0 0 0 0 0 0 1 0]) > > There is no way that 'network-lookup-address-info' on google.com > should return ::1. 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] > You don=CA=BCt have a spare entry lying around in > /etc/hosts for google.com by any chance? C-x i /etc/hosts RET: 127.0.0.1 localhost 127.0.1.1 tia # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters > What do you get for > > (network-lookup-address-info "google.com") ([10752 5200 16395 3073 0 0 0 139 0] [10752 5200 16395 3073 0 0 0 138 0] [10752 5200 16395 3073 0 0 0 102 0] [10752 5200 16395 3073 0 0 0 100 0] [74 125 193 100 0] [74 125 193 102 0] [74 125 193 138 0] [74 125 193 101 0] [74 125 193 113 0] [74 125 193 139 0]) > (network-lookup-address-info "google.com" 'ipv4) ([74 125 193 100 0] [74 125 193 138 0] [74 125 193 139 0] [74 125 193 113 0] [74 125 193 101 0] [74 125 193 102 0]) > (network-lookup-address-info "google.com" 'ipv6) ([10752 5200 16395 3073 0 0 0 102 0] [10752 5200 16395 3073 0 0 0 113 0] [10752 5200 16395 3073 0 0 0 139 0] [10752 5200 16395 3073 0 0 0 101 0]) > How about: > > (require 'dns) > (dns-query "google.com" 'A) "74.125.193.139" > (dns-query "google.com" 'AAAA) "2a00:1450:400b:c01:0:0:0:65" >> 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])) >> >> I've observed that the test fails only on my home network. I've heard >> that my ISP and the modem they provide use a weird dual IPv6 stack that >> has caused people problems in the past, but I know next to nothing about >> these things and can't say if it's related to the issue at hand. > > Most IPv6 stacks are dual stack IPv4/IPv6. Do they mean they're doing > IPv4 in IPv6 in some way? Sorry, I don't know. Is there a way to find out that doesn't involve contacting them (which I never look forward to :)? > Which ISP is this? Virgin Media in Ireland. >> Another observation is that the test succeeds if I replace "google.com" >> with "gnu.org". Should I just change the test to use "gnu.org", and >> forget about this? Or is there some interesting issue here? Any >> suggestions or guidance are very welcome. >> >> Here's my /etc/resolv.conf, in case it matters: >> >> # Generated by NetworkManager >> nameserver 8.8.8.8 >> nameserver 8.8.4.4 >> nameserver 2001:4860:4860::8888 >> # NOTE: the libc resolver may not support more than 3 nameservers. >> # The nameservers listed below may not be recognized. >> nameserver 2001:4860:4860::8844 > > And what do you get for=20 > > dig -t A google.com ; <<>> DiG 9.16.8-Debian <<>> -t A google.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32726 ;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 512 ;; QUESTION SECTION: ;google.com. IN A ;; ANSWER SECTION: google.com. 61 IN A 74.125.193.113 google.com. 61 IN A 74.125.193.100 google.com. 61 IN A 74.125.193.139 google.com. 61 IN A 74.125.193.102 google.com. 61 IN A 74.125.193.101 google.com. 61 IN A 74.125.193.138 ;; Query time: 24 msec ;; SERVER: 8.8.8.8#53(8.8.8.8) ;; WHEN: Mon Jan 11 21:10:49 GMT 2021 ;; MSG SIZE rcvd: 135 > dig -t AAAA google.com ; <<>> DiG 9.16.8-Debian <<>> -t AAAA google.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6510 ;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 512 ;; QUESTION SECTION: ;google.com. IN AAAA ;; ANSWER SECTION: google.com. 41 IN AAAA 2a00:1450:400b:c01::8b google.com. 41 IN AAAA 2a00:1450:400b:c01::71 google.com. 41 IN AAAA 2a00:1450:400b:c01::64 google.com. 41 IN AAAA 2a00:1450:400b:c01::8a ;; Query time: 32 msec ;; SERVER: 8.8.8.8#53(8.8.8.8) ;; WHEN: Mon Jan 11 21:11:03 GMT 2021 ;; MSG SIZE rcvd: 151 > This might be interesting as well: > > ping -6 google.com ping -6 google.com PING google.com(2a00:1450:400b:c01::66 (2a00:1450:400b:c01::66)) 56 data by= tes 64 bytes from 2a00:1450:400b:c01::66 (2a00:1450:400b:c01::66): icmp_seq=3D1= ttl=3D107 time=3D12.7 ms 64 bytes from 2a00:1450:400b:c01::66 (2a00:1450:400b:c01::66): icmp_seq=3D2= ttl=3D107 time=3D18.6 ms [...] FWIW, this also happened on my older laptop, not just this new one I'm writing from. Both run the same suite of Debian, Systemd, NetworkManager, etc. Let me know what else I can do, and thanks for your help, --=20 Basil