]> git.eshelyaron.com Git - emacs.git/commit
Only conditionally resolve hosts in nsm-should-check
authorF. Jason Park <jp@neverwas.me>
Mon, 14 Feb 2022 10:36:57 +0000 (02:36 -0800)
committerEshel Yaron <me@eshelyaron.com>
Wed, 18 Sep 2024 10:50:23 +0000 (12:50 +0200)
commit71126f7c9d0d2c44be86205b43279c496fff1773
treee46ddbf109c55fc21475e9cf191341d18a803ba4
parentb94f3ce38ccbd15f0d566e17a0267134699f6ceb
Only conditionally resolve hosts in nsm-should-check

Libraries like `socks' need to run `nsm-verify-connection' without
performing DNS lookups.  This change allows them to achieve this by
binding `nsm-trust-local-network' to nil around calls to that function.

* lisp/net/nsm.el (nsm-should-check): Rework in a functionally
equivalent way, except forgo calling both `network-lookup-address-info'
and `network-interface-list' unless the various conditions regarding
`nsm-trust-local-network' are first satisfied.  Replace `mapc' with
`dolist' to align with modern sensibilities.   (Bug#53941)

(cherry picked from commit 50deb59aaee2a8d773e95a53c91da7bdb2c5cabd)
lisp/net/nsm.el