From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: The netsec thread Date: Tue, 30 Jul 2019 15:12:11 +0200 Message-ID: References: <83h8kqwukq.fsf@gnu.org> <86zhyh7nli.fsf@gmail.com> <86pnzdrn8u.fsf@gmail.com> <834l36koak.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="64606"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 30 15:12:26 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hsRvW-000Ggj-KM for ged-emacs-devel@m.gmane.org; Tue, 30 Jul 2019 15:12:26 +0200 Original-Received: from localhost ([::1]:60958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsRvV-0001bD-FE for ged-emacs-devel@m.gmane.org; Tue, 30 Jul 2019 09:12:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45041) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsRvQ-0001au-IS for emacs-devel@gnu.org; Tue, 30 Jul 2019 09:12:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hsRvP-00012V-Hl for emacs-devel@gnu.org; Tue, 30 Jul 2019 09:12:20 -0400 Original-Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:33140) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hsRvP-00011p-9p for emacs-devel@gnu.org; Tue, 30 Jul 2019 09:12:19 -0400 Original-Received: by mail-wm1-x32c.google.com with SMTP id h19so45297361wme.0 for ; Tue, 30 Jul 2019 06:12:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version:content-transfer-encoding; bh=wloejYq1qRtHNN5UNlSFRIEgiE9XbOqn1X9UmFHJy4E=; b=Q4d2XPG7CST3SIUC9rvGXQToXtJIpEZ1c+/Lb0TqHpjQOF6bHOzk5ENtAXAMpuLY/1 JbVG+a+tcfL+tMbvoF75hY5gvcqRcgqh+vgjfF7aIoUUesDjkxX3V4x18JFk1HxJpV6D DUxBcVNq2Dm2l7V5TaSSfDK/QPkyiDEvSbBTMStQYqzK5bEzOiscMVRwa8IHowz8Ra8O IYYw+2Lv/RxCBuOU1IkD0xDVsDM9Yoyx+uXwjdw1lmkwxHNLKpSbNRWbFJsYwX5Hcsc+ hYRV1zXazbQlLxaJH1w7W1RePkqva6yQN0m5fiuWyTeXyrxWdBQxF3pXlyy+dgbjuPuG ijaA== 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:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=wloejYq1qRtHNN5UNlSFRIEgiE9XbOqn1X9UmFHJy4E=; b=ldXkNU0u+n1j4up+yu0+poz+R5jdJcTv7pGeFb/3XG/RUJ+pkFf4GxOaCOCgl1rlIj 1gvRt4R21PWt3zW0mtKTdxwGL0aV7w2Bo2Egpns4zI2S9omS3LDphxHDXAF0Dh1dO4MT wPKA52/Yjpi4V64GIuCaxTm7FUjgiXoC/stIIpq93NJOR3MIg1so784fe3+vI+XZ5FUP ZJwciParfAY7TT5uSuOVUSnj/xQG9eEfEAzwdsDBthOenyQIb5DtvPjUcXkNERdbza8V VrZl35gSB6Q+Sy01LgR2fPpZgVDxz+mY9tHlQ8tdjokwG4tjmWOpYFf+Iq26x9CovFa/ WRYg== X-Gm-Message-State: APjAAAWcOc7QrEf1UEwpe/8lW9Q8vmeEcIxnu+rDNweh22fLzuwRsu6b B4kPRhidmY+vmyLL8J0d0MzOH2sw X-Google-Smtp-Source: APXvYqz48e2W26ke89IatmC7bTk3jkwro2owrHB6Q/j+CbAe0kQ+8ZxEnE0Z8B6ta60oK8P84+iqnw== X-Received: by 2002:a1c:a909:: with SMTP id s9mr104298522wme.20.1564492337135; Tue, 30 Jul 2019 06:12:17 -0700 (PDT) Original-Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id n14sm124040372wra.75.2019.07.30.06.12.14 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 30 Jul 2019 06:12:15 -0700 (PDT) Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: (Lars Ingebrigtsen's message of "Tue, 30 Jul 2019 13:30:56 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239029 Archived-At: >>>>> On Tue, 30 Jul 2019 13:30:56 +0200, Lars Ingebrigtsen said: Lars> Robert Pluim writes: >> I found the bottom half of the implementation, and just wrote the top >> half. I=CA=BCm wondering if 'network-lookup-address-info' should ju= st >> return 5/9 element vectors like 'network-interface-info' (for >> IPv4/IPv6), so that remembering to chop the port off the end becomes >> unnecessary. Lars> Makes sense, I think. >> Tested only on macOS so far. It covers the localhost case because >> 'network-interface-list' returns the loopback interface, which is tr= ue >> on my GNU/Linux box as well. If there=CA=BCs a platform where that= =CA=BCs not >> true we'll have to adjust the test. >>=20 >> Robert >>=20 >> 2019-07-29 Robert Pluim >>=20 >> * lisp/net/nsm.el (nsm-network-same-subnet): New function. Checks >> if an ip address is in the same subnet as another one. >> (nsm-should-check): Use nsm-network-same-subnet to see if we're >> connecting to a local subnet machine. Remove checks for RFC1918 add= resses. Lars> OK; are you applying this to the netsec branch? Yes, once I=CA=BCve finished writing the tests, and undone the port stripping in network-lookup-address-info, and made sure it works for ipv6. My home internet is down at the moment, so it might be a few days. Robert