From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.devel Subject: Re: netsec 682578f 4/6: Add option to bypass NSM TLS checks on local networks Date: Mon, 16 Jul 2018 18:06:44 +0100 Message-ID: References: <20180714170806.8972.58581@vcs0.savannah.gnu.org> <20180714170809.C3A3920456@vcs0.savannah.gnu.org> <87o9f84t89.fsf@gmail.com> <4C758D1D-7C3A-425A-852F-75E03C779E01@gmail.com> <87va9fs3ro.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1531760703 23979 195.159.176.226 (16 Jul 2018 17:05:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 16 Jul 2018 17:05:03 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 16 19:04:59 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ff6vi-00068H-Cb for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2018 19:04:58 +0200 Original-Received: from localhost ([::1]:52908 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ff6xp-0001Ez-50 for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2018 13:07:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ff6xc-0001Es-FI for emacs-devel@gnu.org; Mon, 16 Jul 2018 13:07:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ff6xZ-0007b4-B9 for emacs-devel@gnu.org; Mon, 16 Jul 2018 13:06:56 -0400 Original-Received: from [195.159.176.226] (port=37792 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ff6xZ-0007ak-3j for emacs-devel@gnu.org; Mon, 16 Jul 2018 13:06:53 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1ff6vP-0005og-MP for emacs-devel@gnu.org; Mon, 16 Jul 2018 19:04:39 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 41 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:55Fhsc02++Yez6PA+rDruomiQQ8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:227467 Archived-At: On Mon 16 Jul 2018, Robert Pluim wrote: > Jimmy Yuen Ho Wong writes: > >>> On 15 Jul 2018, at 12:46 pm, Robert Pluim wrote: >>> >>> wyuenho@gmail.com (Jimmy Yuen Ho Wong) writes: >>> >>>> branch: netsec >>>> commit 682578fcf74d4598e39eca81e09d81810d3fc28d >>>> Author: Jimmy Yuen Ho Wong >>>> Commit: Jimmy Yuen Ho Wong >>>> >>>> Add option to bypass NSM TLS checks on local networks >>>> >>>> * lisp/net/net-utils.el (nslookup-host-ipv4, nslookup-host-ipv6, >>>> ipv6-expand): New functions to lookup IPv4 and IPv6 addresses from >>>> DNS. >>> >>> So this only works for people who have nslookup installed? Emacs >>> already uses getaddrinfo internally, would it help you if there was a >>> lisp-level interface to it? >>> >> >> Yes it would. I was asking for that exact same thing :) lend me a hand on this? > > Iʼm terrible at choosing names, please suggest better ones > (hostname-lookup, gethostbyname,....?). Output currently looks like > this, including a port number, but thatʼs easily changed: Given that we already have `network-interface-list' and `network-interface-info' I think this should be named `network-address-info'. Your patch works on Windows 10 (64bit mingw64 MSYS2): ELISP> (get-address-info "www.slashdot.org" 'ipv4) ([216 105 38 15 0]) ELISP> (get-address-info "google.com") ([216 58 213 110 0])